search_api-8.x-1.15/src/Event/SearchApiEvents.php
src/Event/SearchApiEvents.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | <?php namespace Drupal\search_api\Event; /** * Defines events for the Search API module. */ final class SearchApiEvents { /** * The name of the event fired when determining a server backend's features. * * This allows modules to change the features that the given server/backend * advertises as being supported. This can, for example, be used to disable * certain features, or to officially add support for features which are * implemented in other contrib modules by altering searches directly. * * @Event * * @see \Drupal\search_api\Event\DeterminingServerFeaturesEvent */ const DETERMINING_SERVER_FEATURES = 'search_api.determining_server_features' ; /** * The name of the event fired when gathering backend plugins. * * @Event * * @see \Drupal\search_api\Event\GatheringPluginInfoEvent */ const GATHERING_BACKENDS = 'search_api.gathering_backends' ; /** * The name of the event fired when gathering datasource plugins. * * @Event * * @see \Drupal\search_api\Event\GatheringPluginInfoEvent */ const GATHERING_DATA_SOURCES = 'search_api.gathering_data_sources' ; /** * The name of the event fired when gathering data type plugins. * * @Event * * @see \Drupal\search_api\Event\GatheringPluginInfoEvent */ const GATHERING_DATA_TYPES = 'search_api.gathering_data_types' ; /** * The name of the event fired when gathering display plugins. * * @Event * * @see \Drupal\search_api\Event\GatheringPluginInfoEvent */ const GATHERING_DISPLAYS = 'search_api.gathering_displays' ; /** * The name of the event fired when gathering parse mode plugins. * * @Event * * @see \Drupal\search_api\Event\GatheringPluginInfoEvent */ const GATHERING_PARSE_MODES = 'search_api.gathering_parse_modes' ; /** * The name of the event fired when gathering processor plugins. * * @Event * * @see \Drupal\search_api\Event\GatheringPluginInfoEvent */ const GATHERING_PROCESSORS = 'search_api.gathering_processors' ; /** * The name of the event fired when gathering tracker plugins. * * @Event * * @see \Drupal\search_api\Event\GatheringPluginInfoEvent */ const GATHERING_TRACKERS = 'search_api.gathering_trackers' ; /** * The name of the event fired when preparing items for indexing. * * This can be used to modify the items in some way before their fields are * extracted and they are passed to the server. * * Please be aware that generally preventing the indexing of certain items is * deprecated. This is better done with processors, which can easily be * configured and only added to indexes where this behaviour is wanted. * If your module will use this event to reject certain items from indexing, * please document this clearly to avoid confusion. * * @Event * * @see \Drupal\search_api\Event\IndexingItemsEvent */ const INDEXING_ITEMS = 'search_api.indexing_items' ; /** * The name of the event fired when items have been successfully indexed. * * @Event * * @see \Drupal\search_api\Event\ItemsIndexedEvent */ const ITEMS_INDEXED = 'search_api.items_indexed' ; /** * The name of the event fired when mapping data types. * * The mapping is done between types defined by Drupal Core's Typed Data API * and the Search API-internal data types. This determines the default type * for newly added fields as well as what properties can even be indexed. * * @Event * * @see \Drupal\search_api\Event\MappingFieldTypesEvent */ const MAPPING_FIELD_TYPES = 'search_api.mapping_field_types' ; /** * The name of the event fired when building a map of Views field handlers. * * This is used in the Search API Views integration to create Search * API-specific field handlers for all properties of datasources and some * entity types. * * In addition to the definition returned here, for Field API fields, the * "field_name" will be set to the field's machine name. * * @Event * * @see \Drupal\search_api\Event\MappingViewsFieldHandlersEvent * @see _search_api_views_get_field_handler_mapping() */ const MAPPING_VIEWS_FIELD_HANDLERS = 'search_api.mapping_views_field_handlers' ; /** * The name of the event fired when building a map of Views handlers. * * This is used in the Search API Views integration to determine the filter, * argument and sort handlers that will be used for fields of that type. * * Field handlers are not determined by these simplified (Search API) types, * but by their actual property data types. For altering that mapping, see * \Drupal\search_api\Event\SearchApiEvents::MAPPING_VIEWS_FIELD_HANDLERS. * * @Event * * @see \Drupal\search_api\Event\MappingViewsFieldHandlersEvent * @see _search_api_views_handler_mapping() */ const MAPPING_VIEWS_HANDLERS = 'search_api.mapping_views_handlers' ; /** * The name of the event fired after a search has been executed on the server. * * This can be used to modify search results or otherwise react to the search. * * @Event * * @see \Drupal\search_api\Event\ProcessingResultsEvent */ const PROCESSING_RESULTS = 'search_api.processing_results' ; /** * The name of the event fired before executing a search query. * * This can be used to add additional filters, options or other data to the * search query. * * @Event * * @see \Drupal\search_api\Event\QueryPreExecuteEvent */ const QUERY_PRE_EXECUTE = 'search_api.query_pre_execute' ; /** * The name of the event fired when scheduling an index for re-indexing. * * When clearing an index or completely rebuilding an index's tracker * information, the same hook is fired (as those operations also involve * reindexing the complete index contents). * * @Event * * @see \Drupal\search_api\Event\ReindexScheduledEvent */ const REINDEX_SCHEDULED = 'search_api.reindex_scheduled' ; } |