public function Flags::getValueOptions in CMS Content Sync 2.0.x
Same name and namespace in other branches
- 8 modules/cms_content_sync_views/src/Plugin/views/filter/Flags.php \Drupal\cms_content_sync_views\Plugin\views\filter\Flags::getValueOptions()
- 2.1.x modules/cms_content_sync_views/src/Plugin/views/filter/Flags.php \Drupal\cms_content_sync_views\Plugin\views\filter\Flags::getValueOptions()
Child classes should be used to override this function and set the 'value options', unless 'options callback' is defined as a valid function or static public method to generate these values.
This can use a guard to be used to reduce database hits as much as possible.
Return value
array|null The stored values from $this->valueOptions.
Overrides InOperator::getValueOptions
File
- modules/
cms_content_sync_views/ src/ Plugin/ views/ filter/ Flags.php, line 37
Class
- Flags
- Provides a view filter to filter on the sync state entity.
Namespace
Drupal\cms_content_sync_views\Plugin\views\filterCode
public function getValueOptions() {
if (!isset($this->valueOptions)) {
$this->valueTitle = $this
->t('Flags');
$this->valueOptions = [
'push_failed' => $this
->t(RenderedFlags::describeFlag('push_failed')),
'push_failed_soft' => $this
->t(RenderedFlags::describeFlag('push_failed_soft')),
'pull_failed_soft' => $this
->t(RenderedFlags::describeFlag('pull_failed_soft')),
'pull_failed' => $this
->t(RenderedFlags::describeFlag('pull_failed')),
'last_push_reset' => $this
->t(RenderedFlags::describeFlag('last_push_reset')),
'last_pull_reset' => $this
->t(RenderedFlags::describeFlag('last_pull_reset')),
'is_source_entity' => $this
->t(RenderedFlags::describeFlag('is_source_entity')),
'edit_override' => $this
->t(RenderedFlags::describeFlag('edit_override')),
'is_deleted' => $this
->t(RenderedFlags::describeFlag('is_deleted')),
];
}
return $this->valueOptions;
}