/** * {@inheritdoc} */ public function setSearch($keywords, array $parameters, array $attributes) { if (empty($parameters['search_conditions'])) { $parameters['search_conditions'] = ''; } parent::setSearch($keywords, $parameters, $attributes); }
/** * Constructs a \Drupal\node\Plugin\Search\NodeSearch object. * * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id * The plugin_id for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Database\Connection $database * A database connection object. * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * An entity manager object. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * A module manager object. * @param \Drupal\Core\Config\Config $search_settings * A config object for 'search.settings'. * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager * The language manager. * @param \Drupal\Core\Session\AccountInterface $account * The $account object to use for checking for access to advanced search. */ public function __construct(array $configuration, $plugin_id, $plugin_definition, Connection $database, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler, Config $search_settings, LanguageManagerInterface $language_manager, RendererInterface $renderer, AccountInterface $account = NULL) { $this->database = $database; $this->entityManager = $entity_manager; $this->moduleHandler = $module_handler; $this->searchSettings = $search_settings; $this->languageManager = $language_manager; $this->renderer = $renderer; $this->account = $account; parent::__construct($configuration, $plugin_id, $plugin_definition); }