Flow.php in CMS Content Sync 8
File
modules/cms_content_sync_views/src/Plugin/views/filter/Flow.php
View source
<?php
namespace Drupal\cms_content_sync_views\Plugin\views\filter;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\views\Plugin\views\filter\InOperator;
class Flow extends InOperator implements ContainerFactoryPluginInterface {
public function getValueOptions() {
if (!isset($this->valueOptions)) {
$this->valueTitle = $this
->t('Flows');
$flows = \Drupal\cms_content_sync\Entity\Flow::getAll();
foreach ($flows as $flow_name => $flow) {
$this->valueOptions[$flow_name] = $flow
->label();
}
if (!empty($this->valueOptions)) {
return $this->valueOptions;
}
}
return $this->valueOptions['none'] = $this
->t('None');
}
}
Classes
Name |
Description |
Flow |
Provides a view filter to filter on the sync state entity. |