/** * {@inheritdoc} */ protected function setUp() { parent::setUp(); $this->installConfig(['jquery_ui_filter']); // Reset HTML ids. Html::resetSeenIds(); // Get \Drupal\jquery_ui_filter\Plugin\Filter\jQueryUiFilter object. $filter_bag = new FilterPluginCollection(\Drupal::service('plugin.manager.filter'), ['jquery_ui_filter']); $this->filter = $filter_bag->get('jquery_ui_filter'); }
/** * {@inheritdoc} */ public function filters($instance_id = NULL) { if (!isset($this->filterCollection)) { $this->filterCollection = new FilterPluginCollection(\Drupal::service('plugin.manager.filter'), $this->filters); $this->filterCollection->sort(); } if (isset($instance_id)) { return $this->filterCollection->get($instance_id); } return $this->filterCollection; }