Loading CHANGELOG.txt +2 −0 Original line number Diff line number Diff line Search API 1.x, dev (xxxx-xx-xx): --------------------------------- - #3168162 by gabesullice, drunken monkey, mkalkbrenner: Updated to latest changes in Event system. - #3248262 by Robert_T, drunken monkey: Fixed problems with recent database update functions. - #3239649 by drunken monkey, phma: Fixed missing config schemas for various Loading modules/search_api_db/src/Event/QueryPreExecuteEvent.php +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ namespace Drupal\search_api_db\Event; use Drupal\Core\Database\Query\SelectInterface; use Drupal\search_api\Query\QueryInterface; use Symfony\Component\EventDispatcher\Event; use Drupal\Component\EventDispatcher\Event; /** * Wraps a query pre-execute event. Loading modules/search_api_db/src/Plugin/search_api/backend/Database.php +5 −5 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ use Drupal\search_api_db\DatabaseCompatibility\GenericDatabase; use Drupal\search_api_db\Event\QueryPreExecuteEvent; use Drupal\search_api_db\Event\SearchApiDbEvents; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; /** * Indexes and searches items using the database. Loading Loading @@ -139,7 +139,7 @@ class Database extends BackendPluginBase implements AutocompleteBackendInterface /** * The event dispatcher. * * @var \Symfony\Component\EventDispatcher\EventDispatcherInterface|null * @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface|null */ protected $eventDispatcher; Loading Loading @@ -363,7 +363,7 @@ class Database extends BackendPluginBase implements AutocompleteBackendInterface /** * Retrieves the event dispatcher. * * @return \Symfony\Component\EventDispatcher\EventDispatcherInterface * @return \Symfony\Contracts\EventDispatcher\EventDispatcherInterface * The event dispatcher. */ public function getEventDispatcher() { Loading @@ -373,7 +373,7 @@ class Database extends BackendPluginBase implements AutocompleteBackendInterface /** * Sets the event dispatcher. * * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher * @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher * The new event dispatcher. * * @return $this Loading Loading @@ -1824,7 +1824,7 @@ class Database extends BackendPluginBase implements AutocompleteBackendInterface // query is constructed from it). $event_base_name = SearchApiDbEvents::QUERY_PRE_EXECUTE; $event = new QueryPreExecuteEvent($db_query, $query); $this->getEventDispatcher()->dispatch($event_base_name, $event); $this->getEventDispatcher()->dispatch($event, $event_base_name); $db_query = $event->getDbQuery(); $description = 'This hook is deprecated in search_api:8.x-1.16 and is removed from search_api:2.0.0. Please use the "search_api_db.query_pre_execute" event instead. See https://www.drupal.org/node/3103591'; Loading modules/search_api_db/tests/src/Kernel/BackendTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -1122,7 +1122,7 @@ class BackendTest extends BackendTestBase { \Drupal::moduleHandler()->alter('search_api_index_items', $index, $items); $event = new IndexingItemsEvent($index, $items); \Drupal::getContainer()->get('event_dispatcher') ->dispatch(SearchApiEvents::INDEXING_ITEMS, $event); ->dispatch($event, SearchApiEvents::INDEXING_ITEMS); foreach ($items as $item) { // This will cache the extracted fields so processors, etc., can retrieve // them directly. Loading search_api.views.inc +2 −2 Original line number Diff line number Diff line Loading @@ -407,7 +407,7 @@ function _search_api_views_handler_mapping() { $event = new MappingViewsHandlersEvent($mapping); \Drupal::getContainer()->get('event_dispatcher') ->dispatch(SearchApiEvents::MAPPING_VIEWS_HANDLERS, $event); ->dispatch($event, SearchApiEvents::MAPPING_VIEWS_HANDLERS); } return $mapping; Loading Loading @@ -998,7 +998,7 @@ function _search_api_views_get_field_handler_mapping() { $event = new MappingViewsFieldHandlersEvent($plain_mapping); \Drupal::getContainer()->get('event_dispatcher') ->dispatch(SearchApiEvents::MAPPING_VIEWS_FIELD_HANDLERS, $event); ->dispatch($event, SearchApiEvents::MAPPING_VIEWS_FIELD_HANDLERS); // Then create a new, more practical structure, with the mappings grouped by // mapping type. Loading Loading
CHANGELOG.txt +2 −0 Original line number Diff line number Diff line Search API 1.x, dev (xxxx-xx-xx): --------------------------------- - #3168162 by gabesullice, drunken monkey, mkalkbrenner: Updated to latest changes in Event system. - #3248262 by Robert_T, drunken monkey: Fixed problems with recent database update functions. - #3239649 by drunken monkey, phma: Fixed missing config schemas for various Loading
modules/search_api_db/src/Event/QueryPreExecuteEvent.php +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ namespace Drupal\search_api_db\Event; use Drupal\Core\Database\Query\SelectInterface; use Drupal\search_api\Query\QueryInterface; use Symfony\Component\EventDispatcher\Event; use Drupal\Component\EventDispatcher\Event; /** * Wraps a query pre-execute event. Loading
modules/search_api_db/src/Plugin/search_api/backend/Database.php +5 −5 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ use Drupal\search_api_db\DatabaseCompatibility\GenericDatabase; use Drupal\search_api_db\Event\QueryPreExecuteEvent; use Drupal\search_api_db\Event\SearchApiDbEvents; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; /** * Indexes and searches items using the database. Loading Loading @@ -139,7 +139,7 @@ class Database extends BackendPluginBase implements AutocompleteBackendInterface /** * The event dispatcher. * * @var \Symfony\Component\EventDispatcher\EventDispatcherInterface|null * @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface|null */ protected $eventDispatcher; Loading Loading @@ -363,7 +363,7 @@ class Database extends BackendPluginBase implements AutocompleteBackendInterface /** * Retrieves the event dispatcher. * * @return \Symfony\Component\EventDispatcher\EventDispatcherInterface * @return \Symfony\Contracts\EventDispatcher\EventDispatcherInterface * The event dispatcher. */ public function getEventDispatcher() { Loading @@ -373,7 +373,7 @@ class Database extends BackendPluginBase implements AutocompleteBackendInterface /** * Sets the event dispatcher. * * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher * @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher * The new event dispatcher. * * @return $this Loading Loading @@ -1824,7 +1824,7 @@ class Database extends BackendPluginBase implements AutocompleteBackendInterface // query is constructed from it). $event_base_name = SearchApiDbEvents::QUERY_PRE_EXECUTE; $event = new QueryPreExecuteEvent($db_query, $query); $this->getEventDispatcher()->dispatch($event_base_name, $event); $this->getEventDispatcher()->dispatch($event, $event_base_name); $db_query = $event->getDbQuery(); $description = 'This hook is deprecated in search_api:8.x-1.16 and is removed from search_api:2.0.0. Please use the "search_api_db.query_pre_execute" event instead. See https://www.drupal.org/node/3103591'; Loading
modules/search_api_db/tests/src/Kernel/BackendTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -1122,7 +1122,7 @@ class BackendTest extends BackendTestBase { \Drupal::moduleHandler()->alter('search_api_index_items', $index, $items); $event = new IndexingItemsEvent($index, $items); \Drupal::getContainer()->get('event_dispatcher') ->dispatch(SearchApiEvents::INDEXING_ITEMS, $event); ->dispatch($event, SearchApiEvents::INDEXING_ITEMS); foreach ($items as $item) { // This will cache the extracted fields so processors, etc., can retrieve // them directly. Loading
search_api.views.inc +2 −2 Original line number Diff line number Diff line Loading @@ -407,7 +407,7 @@ function _search_api_views_handler_mapping() { $event = new MappingViewsHandlersEvent($mapping); \Drupal::getContainer()->get('event_dispatcher') ->dispatch(SearchApiEvents::MAPPING_VIEWS_HANDLERS, $event); ->dispatch($event, SearchApiEvents::MAPPING_VIEWS_HANDLERS); } return $mapping; Loading Loading @@ -998,7 +998,7 @@ function _search_api_views_get_field_handler_mapping() { $event = new MappingViewsFieldHandlersEvent($plain_mapping); \Drupal::getContainer()->get('event_dispatcher') ->dispatch(SearchApiEvents::MAPPING_VIEWS_FIELD_HANDLERS, $event); ->dispatch($event, SearchApiEvents::MAPPING_VIEWS_FIELD_HANDLERS); // Then create a new, more practical structure, with the mappings grouped by // mapping type. Loading