You are here

interface EntityDatasourceInterface in Search API 8

Describes an interface for entity datasources.

Hierarchy

Expanded class hierarchy of EntityDatasourceInterface

All classes that implement EntityDatasourceInterface

Deprecated

in search_api:8.x-1.16 and is removed from search_api:2.0.0. There is no replacement.

See also

https://www.drupal.org/node/3103584

File

src/Plugin/search_api/datasource/EntityDatasourceInterface.php, line 18

Namespace

Drupal\search_api\Plugin\search_api\datasource
View source
interface EntityDatasourceInterface extends DatasourceInterface {

  /**
   * Retrieves all indexes that are configured to index the given entity.
   *
   * @param \Drupal\Core\Entity\ContentEntityInterface $entity
   *   The entity for which to check.
   *
   * @return \Drupal\search_api\IndexInterface[]
   *   All indexes that are configured to index the given entity (using this
   *   datasource class).
   */
  public static function getIndexesForEntity(ContentEntityInterface $entity);

  /**
   * Retrieves all item IDs of entities of the specified bundles.
   *
   * @param int|null $page
   *   The zero-based page of IDs to retrieve, for the paging mechanism
   *   implemented by this datasource; or NULL to retrieve all items at once.
   * @param string[]|null $bundles
   *   (optional) The bundles for which all item IDs should be returned; or NULL
   *   to retrieve IDs from all enabled bundles in this datasource.
   * @param string[]|null $languages
   *   (optional) The languages for which all item IDs should be returned; or
   *   NULL to retrieve IDs from all enabled languages in this datasource.
   *
   * @return string[]|null
   *   An array of all item IDs matching these conditions; or NULL if a page was
   *   specified and there are no more items for that and all following pages.
   *   In case both bundles and languages are specified, they are combined with
   *   OR.
   */
  public function getPartialItemIds($page = NULL, array $bundles = NULL, array $languages = NULL);

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 11
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 12
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 12
ConfigurablePluginInterface::getDescription public function Returns the plugin's description. 1
ConfigurablePluginInterface::label public function Returns the label for use on the administration pages. 1
ConfigurablePluginInterface::onDependencyRemoval public function Informs the plugin that some of its dependencies are being removed. 1
ContainerFactoryPluginInterface::create public static function Creates an instance of the plugin. 112
DatasourceInterface::canContainEntityReferences public function Determines whether this datasource can contain entity references. 1
DatasourceInterface::checkItemAccess Deprecated public function Checks whether a user has permission to view the given item. 1
DatasourceInterface::getAffectedItemsForEntityChange public function Identifies items affected by a change to a referenced entity. 1
DatasourceInterface::getBundles public function Retrieves the bundles associated to this datasource. 1
DatasourceInterface::getEntityTypeId public function Retrieves the entity type ID of items from this datasource, if any. 1
DatasourceInterface::getFieldDependencies public function Retrieves any dependencies of the given fields. 1
DatasourceInterface::getItemAccessResult public function Checks whether a user has permission to view the given item. 1
DatasourceInterface::getItemBundle public function Retrieves the item's bundle. 1
DatasourceInterface::getItemId public function Retrieves the unique ID of an object from this datasource. 3
DatasourceInterface::getItemIds public function Returns a list of IDs of items from this datasource. 1
DatasourceInterface::getItemLabel public function Retrieves a human-readable label for an item. 1
DatasourceInterface::getItemLanguage public function Retrieves the item's language. 1
DatasourceInterface::getItemUrl public function Retrieves a URL at which the item can be viewed on the web. 1
DatasourceInterface::getListCacheContexts public function Returns the list cache contexts associated with this datasource. 1
DatasourceInterface::getPropertyDefinitions public function Retrieves the properties exposed by the underlying complex data type. 1
DatasourceInterface::getViewModes public function Returns the available view modes for this datasource. 1
DatasourceInterface::load public function Loads an item. 1
DatasourceInterface::loadMultiple public function Loads multiple items. 1
DatasourceInterface::viewItem public function Returns the render array for the provided item and view mode. 1
DatasourceInterface::viewMultipleItems public function Returns the render array for the provided items and view mode. 1
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 19
DerivativeInspectionInterface::getBaseId public function Gets the base_plugin_id of the plugin instance. 1
DerivativeInspectionInterface::getDerivativeId public function Gets the derivative_id of the plugin instance. 1
EntityDatasourceInterface::getIndexesForEntity public static function Retrieves all indexes that are configured to index the given entity.
EntityDatasourceInterface::getPartialItemIds public function Retrieves all item IDs of entities of the specified bundles.
HideablePluginInterface::isHidden public function Determines whether this plugin should be hidden in the UI. 1
IndexPluginInterface::getIndex public function Retrieves the index this plugin is configured for. 1
IndexPluginInterface::setIndex public function Sets the index this plugin is configured for. 1
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2