You are here

class UnsavedIndexConfiguration in Search API 8

Represents a configuration of an index that was not yet permanently saved.

Hierarchy

Expanded class hierarchy of UnsavedIndexConfiguration

1 file declares its use of UnsavedIndexConfiguration
SearchApiConverter.php in src/ParamConverter/SearchApiConverter.php

File

src/UnsavedIndexConfiguration.php, line 25

Namespace

Drupal\search_api
View source
class UnsavedIndexConfiguration implements IndexInterface, UnsavedConfigurationInterface {

  /**
   * The proxied index.
   *
   * @var \Drupal\search_api\IndexInterface
   */
  protected $entity;

  /**
   * The shared temporary storage to use.
   *
   * @var \Drupal\Core\TempStore\SharedTempStore
   */
  protected $tempStore;

  /**
   * Either the UID of the currently logged-in user, or the session ID.
   *
   * @var int|string
   */
  protected $currentUserId;

  /**
   * The lock information for this configuration.
   *
   * @var \Drupal\Core\TempStore\Lock|null
   */
  protected $lock;

  /**
   * The entity type manager.
   *
   * @var \Drupal\Core\Entity\EntityTypeManagerInterface|null
   */
  protected $entityTypeManager;

  /**
   * Constructs a new UnsavedIndexConfiguration.
   *
   * @param \Drupal\search_api\IndexInterface $index
   *   The index to proxy.
   * @param \Drupal\Core\TempStore\SharedTempStore $temp_store
   *   The shared temporary storage to use.
   * @param int|string $current_user_id
   *   Either the UID of the currently logged-in user, or the session ID (for
   *   anonymous users).
   */
  public function __construct(IndexInterface $index, SharedTempStore $temp_store, $current_user_id) {
    $this->entity = $index;
    $this->tempStore = $temp_store;
    $this->currentUserId = $current_user_id;
  }

  /**
   * Retrieves the entity type manager.
   *
   * @return \Drupal\Core\Entity\EntityTypeManagerInterface
   *   The entity type manager.
   */
  public function getEntityTypeManager() {
    return $this->entityTypeManager ?: \Drupal::entityTypeManager();
  }

  /**
   * Sets the entity type manager.
   *
   * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
   *   The new entity type manager.
   *
   * @return $this
   */
  public function setEntityTypeManager(EntityTypeManagerInterface $entity_type_manager) {
    $this->entityTypeManager = $entity_type_manager;
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function setCurrentUserId($current_user_id) {
    $this->currentUserId = $current_user_id;
  }

  /**
   * {@inheritdoc}
   */
  public function hasChanges() {
    return (bool) $this->lock;
  }

  /**
   * {@inheritdoc}
   */
  public function isLocked() {
    if ($this->lock) {
      return $this->lock
        ->getOwnerId() != $this->currentUserId;
    }
    return FALSE;
  }

  /**
   * {@inheritdoc}
   */
  public function getLockOwner() {
    if (!$this->lock) {
      return NULL;
    }
    $owner_id = $this->lock
      ->getOwnerId();
    $uid = is_numeric($owner_id) ? $owner_id : 0;
    try {
      return $this
        ->getEntityTypeManager()
        ->getStorage('user')
        ->load($uid);
    } catch (InvalidPluginDefinitionException $e) {
      return NULL;
    } catch (PluginNotFoundException $e) {
      return NULL;
    }
  }

  /**
   * {@inheritdoc}
   */
  public function getLastUpdated() {
    return $this->lock ? $this->lock
      ->getUpdated() : NULL;
  }

  /**
   * {@inheritdoc}
   */
  public function setLockInformation($lock = NULL) {
    $this->lock = $lock;
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function savePermanent() {

    // Make sure to overwrite only the index's fields, not just all properties.
    // Unlike the Views UI, we have several separate pages for editing index
    // entities, and only one of them is locked. Therefore, this extra step is
    // necessary, we can't just call $this->entity->save().

    /** @var \Drupal\search_api\Entity\SearchApiConfigEntityStorage $storage */
    $storage = $this
      ->getEntityTypeManager()
      ->getStorage('search_api_index');
    $storage
      ->resetCache([
      $this->entity
        ->id(),
    ]);

    /** @var \Drupal\search_api\IndexInterface $original */
    $original = $storage
      ->loadOverrideFree($this->entity
      ->id());
    $fields = $this->entity
      ->getFields();

    // Set the correct index object on the field objects.
    foreach ($fields as $field) {
      $field
        ->setIndex($original);
    }
    $original
      ->setFields($fields);
    $original
      ->save();

    // Setting the saved entity as the wrapped one is important if methods like
    // isReindexing() are called on the object afterwards.
    $this->entity = $original;
    $this
      ->discardChanges();
  }

  /**
   * {@inheritdoc}
   */
  public function discardChanges() {
    $this->tempStore
      ->delete($this->entity
      ->id());
  }

  /**
   * {@inheritdoc}
   */
  public function getDescription() {
    return $this->entity
      ->getDescription();
  }

  /**
   * {@inheritdoc}
   */
  public function isReadOnly() {
    return $this->entity
      ->isReadOnly();
  }

  /**
   * {@inheritdoc}
   */
  public function getOption($name, $default = NULL) {
    return $this->entity
      ->getOption($name, $default);
  }

  /**
   * {@inheritdoc}
   */
  public function getOptions() {
    return $this->entity
      ->getOptions();
  }

  /**
   * {@inheritdoc}
   */
  public function setOption($name, $option) {
    $this->entity
      ->setOption($name, $option);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function setOptions(array $options) {
    $this->entity
      ->setOptions($options);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getDatasources() {
    return $this->entity
      ->getDatasources();
  }

  /**
   * {@inheritdoc}
   */
  public function getDatasourceIds() {
    return $this->entity
      ->getDatasourceIds();
  }

  /**
   * {@inheritdoc}
   */
  public function isValidDatasource($datasource_id) {
    return $this->entity
      ->isValidDatasource($datasource_id);
  }

  /**
   * {@inheritdoc}
   */
  public function getDatasource($datasource_id) {
    return $this->entity
      ->getDatasource($datasource_id);
  }

  /**
   * {@inheritdoc}
   */
  public function addDatasource(DatasourceInterface $datasource) {
    $this->entity
      ->addDatasource($datasource);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function removeDatasource($datasource_id) {
    $this->entity
      ->removeDatasource($datasource_id);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function setDatasources(array $datasources) {
    $this->entity
      ->setDatasources($datasources);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getEntityTypes() {
    return $this->entity
      ->getEntityTypes();
  }

  /**
   * {@inheritdoc}
   */
  public function hasValidTracker() {
    return $this->entity
      ->hasValidTracker();
  }

  /**
   * {@inheritdoc}
   */
  public function getTrackerId() {
    return $this->entity
      ->getTrackerId();
  }

  /**
   * {@inheritdoc}
   */
  public function getTrackerInstance() {
    return $this->entity
      ->getTrackerInstance();
  }

  /**
   * {@inheritdoc}
   */
  public function setTracker(TrackerInterface $tracker) {
    $this->entity
      ->setTracker($tracker);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function hasValidServer() {
    return $this->entity
      ->hasValidServer();
  }

  /**
   * {@inheritdoc}
   */
  public function isServerEnabled() {
    return $this->entity
      ->isServerEnabled();
  }

  /**
   * {@inheritdoc}
   */
  public function getServerId() {
    return $this->entity
      ->getServerId();
  }

  /**
   * {@inheritdoc}
   */
  public function getServerInstance() {
    return $this->entity
      ->getServerInstance();
  }

  /**
   * {@inheritdoc}
   */
  public function setServer(ServerInterface $server = NULL) {
    $this->entity
      ->setServer($server);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getProcessors() {
    return $this->entity
      ->getProcessors();
  }

  /**
   * {@inheritdoc}
   */
  public function getProcessorsByStage($stage, array $overrides = []) {
    return $this->entity
      ->getProcessorsByStage($stage, $overrides);
  }

  /**
   * {@inheritdoc}
   */
  public function isValidProcessor($processor_id) {
    return $this->entity
      ->isValidProcessor($processor_id);
  }

  /**
   * {@inheritdoc}
   */
  public function getProcessor($processor_id) {
    return $this->entity
      ->getProcessor($processor_id);
  }

  /**
   * {@inheritdoc}
   */
  public function addProcessor(ProcessorInterface $processor) {
    $this->entity
      ->addProcessor($processor);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function removeProcessor($processor_id) {
    $this->entity
      ->removeProcessor($processor_id);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function setProcessors(array $processors) {
    $this->entity
      ->setProcessors($processors);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function alterIndexedItems(array &$items) {
    $this->entity
      ->alterIndexedItems($items);
  }

  /**
   * {@inheritdoc}
   */
  public function preprocessIndexItems(array $items) {
    $this->entity
      ->preprocessIndexItems($items);
  }

  /**
   * {@inheritdoc}
   */
  public function preprocessSearchQuery(QueryInterface $query) {
    $this->entity
      ->preprocessSearchQuery($query);
  }

  /**
   * {@inheritdoc}
   */
  public function postprocessSearchResults(ResultSetInterface $results) {
    $this->entity
      ->postprocessSearchResults($results);
  }

  /**
   * {@inheritdoc}
   */
  public function addField(FieldInterface $field) {
    $this->entity
      ->addField($field);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function renameField($old_field_id, $new_field_id) {
    $this->entity
      ->renameField($old_field_id, $new_field_id);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function removeField($field_id) {
    $this->entity
      ->removeField($field_id);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function setFields(array $fields) {
    $this->entity
      ->setFields($fields);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getFields($include_server_defined = FALSE) {
    return $this->entity
      ->getFields($include_server_defined);
  }

  /**
   * {@inheritdoc}
   */
  public function getField($field_id) {
    return $this->entity
      ->getField($field_id);
  }

  /**
   * {@inheritdoc}
   */
  public function getFieldsByDatasource($datasource_id) {
    return $this->entity
      ->getFieldsByDatasource($datasource_id);
  }

  /**
   * {@inheritdoc}
   */
  public function getFulltextFields() {
    return $this->entity
      ->getFulltextFields();
  }

  /**
   * {@inheritdoc}
   */
  public function getFieldRenames() {
    return $this->entity
      ->getFieldRenames();
  }

  /**
   * {@inheritdoc}
   */
  public function discardFieldChanges() {
    $this->entity
      ->discardFieldChanges();
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getPropertyDefinitions($datasource_id) {
    return $this->entity
      ->getPropertyDefinitions($datasource_id);
  }

  /**
   * {@inheritdoc}
   */
  public function loadItem($item_id) {
    return $this->entity
      ->loadItem($item_id);
  }

  /**
   * {@inheritdoc}
   */
  public function loadItemsMultiple(array $item_ids) {
    return $this->entity
      ->loadItemsMultiple($item_ids);
  }

  /**
   * {@inheritdoc}
   */
  public function indexItems($limit = -1, $datasource_id = NULL) {
    return $this->entity
      ->indexItems($limit, $datasource_id);
  }

  /**
   * {@inheritdoc}
   */
  public function indexSpecificItems(array $search_objects) {
    return $this->entity
      ->indexSpecificItems($search_objects);
  }

  /**
   * {@inheritdoc}
   */
  public function isBatchTracking() {
    return $this->entity
      ->isBatchTracking();
  }

  /**
   * {@inheritdoc}
   */
  public function startBatchTracking() {
    $this->entity
      ->startBatchTracking();
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function stopBatchTracking() {
    $this->entity
      ->stopBatchTracking();
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function trackItemsInserted($datasource_id, array $ids) {
    $this->entity
      ->trackItemsInserted($datasource_id, $ids);
  }

  /**
   * {@inheritdoc}
   */
  public function trackItemsUpdated($datasource_id, array $ids) {
    $this->entity
      ->trackItemsUpdated($datasource_id, $ids);
  }

  /**
   * {@inheritdoc}
   */
  public function trackItemsDeleted($datasource_id, array $ids) {
    $this->entity
      ->trackItemsDeleted($datasource_id, $ids);
  }

  /**
   * {@inheritdoc}
   */
  public function reindex() {
    $this->entity
      ->reindex();
  }

  /**
   * {@inheritdoc}
   */
  public function clear() {
    $this->entity
      ->clear();
  }

  /**
   * {@inheritdoc}
   */
  public function rebuildTracker() {
    $this->entity
      ->rebuildTracker();
  }

  /**
   * {@inheritdoc}
   */
  public function isReindexing() {
    return $this->entity
      ->isReindexing();
  }

  /**
   * {@inheritdoc}
   */
  public function query(array $options = []) {
    return $this->entity
      ->query($options);
  }

  /**
   * {@inheritdoc}
   */
  public function enable() {
    $this->entity
      ->enable();
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function disable() {
    $this->entity
      ->disable();
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function setStatus($status) {
    $this->entity
      ->setStatus($status);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function setSyncing($status) {
    $this->entity
      ->setSyncing($status);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function status() {
    return $this->entity
      ->status();
  }

  /**
   * {@inheritdoc}
   */
  public function isSyncing() {
    return $this->entity
      ->isSyncing();
  }

  /**
   * {@inheritdoc}
   */
  public function isUninstalling() {
    return $this->entity
      ->isUninstalling();
  }

  /**
   * {@inheritdoc}
   */
  public function get($property_name) {
    return $this->entity
      ->get($property_name);
  }

  /**
   * {@inheritdoc}
   */
  public function set($property_name, $value) {
    $this->entity
      ->set($property_name, $value);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function calculateDependencies() {
    $this->entity
      ->calculateDependencies();
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function onDependencyRemoval(array $dependencies) {
    return $this->entity
      ->onDependencyRemoval($dependencies);
  }

  /**
   * {@inheritdoc}
   */
  public function getDependencies() {
    return $this->entity
      ->getDependencies();
  }

  /**
   * {@inheritdoc}
   */
  public function isInstallable() {
    return $this->entity
      ->isInstallable();
  }

  /**
   * {@inheritdoc}
   */
  public function trustData() {
    $this->entity
      ->trustData();
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function hasTrustedData() {
    return $this->entity
      ->hasTrustedData();
  }

  /**
   * {@inheritdoc}
   */
  public function uuid() {
    return $this->entity
      ->uuid();
  }

  /**
   * {@inheritdoc}
   */
  public function id() {
    return $this->entity
      ->id();
  }

  /**
   * {@inheritdoc}
   */
  public function language() {
    return $this->entity
      ->language();
  }

  /**
   * {@inheritdoc}
   */
  public function isNew() {
    return $this->entity
      ->isNew();
  }

  /**
   * {@inheritdoc}
   */
  public function enforceIsNew($value = TRUE) {
    $this->entity
      ->enforceIsNew($value);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getEntityTypeId() {
    return $this->entity
      ->getEntityTypeId();
  }

  /**
   * {@inheritdoc}
   */
  public function bundle() {
    return $this->entity
      ->bundle();
  }

  /**
   * {@inheritdoc}
   */
  public function label() {
    return $this->entity
      ->label();
  }

  /**
   * {@inheritdoc}
   */
  public function urlInfo($rel = 'canonical', array $options = []) {
    return $this->entity
      ->toUrl($rel, $options);
  }

  /**
   * {@inheritdoc}
   */
  public function toUrl($rel = 'canonical', array $options = []) {
    return $this->entity
      ->toUrl($rel, $options);
  }

  /**
   * {@inheritdoc}
   */
  public function url($rel = 'canonical', $options = []) {
    return $this->entity
      ->toUrl($rel, $options)
      ->toString();
  }

  /**
   * {@inheritdoc}
   */
  public function link($text = NULL, $rel = 'canonical', array $options = []) {
    return $this->entity
      ->toLink($text, $rel, $options)
      ->toString();
  }

  /**
   * {@inheritdoc}
   */
  public function toLink($text = NULL, $rel = 'canonical', array $options = []) {
    return $this->entity
      ->toLink($text, $rel, $options);
  }

  /**
   * {@inheritdoc}
   */
  public function hasLinkTemplate($key) {
    return $this->entity
      ->hasLinkTemplate($key);
  }

  /**
   * {@inheritdoc}
   */
  public function uriRelationships() {
    return $this->entity
      ->uriRelationships();
  }

  /**
   * {@inheritdoc}
   */
  public static function load($id) {
    return Index::load($id);
  }

  /**
   * {@inheritdoc}
   */
  public static function loadMultiple(array $ids = NULL) {
    return Index::loadMultiple($ids);
  }

  /**
   * {@inheritdoc}
   */
  public static function create(array $values = []) {
    return Index::create($values);
  }

  /**
   * {@inheritdoc}
   */
  public function save() {
    try {
      if ($this->tempStore
        ->setIfOwner($this->entity
        ->id(), $this->entity)) {
        return SAVED_UPDATED;
      }
    } catch (TempStoreException $e) {
      throw new EntityStorageException('Could not save temporary index configuration: ' . $e
        ->getMessage(), $e
        ->getCode(), $e);
    }
    throw new EntityStorageException('Cannot save temporary index configuration: currently being edited by someone else.');
  }

  /**
   * {@inheritdoc}
   */
  public function delete() {
    $this->entity
      ->delete();
  }

  /**
   * {@inheritdoc}
   */
  public function preSave(EntityStorageInterface $storage) {
    $this->entity
      ->preSave($storage);
  }

  /**
   * {@inheritdoc}
   */
  public function postSave(EntityStorageInterface $storage, $update = TRUE) {
    $this->entity
      ->postSave($storage, $update);
  }

  /**
   * {@inheritdoc}
   */
  public static function preCreate(EntityStorageInterface $storage, array &$values) {
    EntityInterface::preCreate($storage, $values);
  }

  /**
   * {@inheritdoc}
   */
  public function postCreate(EntityStorageInterface $storage) {
    $this->entity
      ->postCreate($storage);
  }

  /**
   * {@inheritdoc}
   */
  public static function preDelete(EntityStorageInterface $storage, array $entities) {
    EntityInterface::preDelete($storage, $entities);
  }

  /**
   * {@inheritdoc}
   */
  public static function postDelete(EntityStorageInterface $storage, array $entities) {
    EntityInterface::postDelete($storage, $entities);
  }

  /**
   * {@inheritdoc}
   */
  public static function postLoad(EntityStorageInterface $storage, array &$entities) {
    EntityInterface::postLoad($storage, $entities);
  }

  /**
   * {@inheritdoc}
   */
  public function createDuplicate() {
    return new UnsavedIndexConfiguration($this->entity
      ->createDuplicate(), $this->tempStore, $this->currentUserId);
  }

  /**
   * {@inheritdoc}
   */
  public function getEntityType() {
    return $this->entity
      ->getEntityType();
  }

  /**
   * {@inheritdoc}
   */
  public function referencedEntities() {
    return $this->entity
      ->referencedEntities();
  }

  /**
   * {@inheritdoc}
   */
  public function getOriginalId() {
    return $this->entity
      ->getOriginalId();
  }

  /**
   * {@inheritdoc}
   */
  public function getCacheTagsToInvalidate() {
    return $this->entity
      ->getCacheTagsToInvalidate();
  }

  /**
   * {@inheritdoc}
   */
  public function setOriginalId($id) {
    $this->entity
      ->setOriginalId($id);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function toArray() {
    return $this->entity
      ->toArray();
  }

  /**
   * {@inheritdoc}
   */
  public function getTypedData() {
    return $this->entity
      ->getTypedData();
  }

  /**
   * {@inheritdoc}
   */
  public function getConfigDependencyKey() {
    return $this->entity
      ->getConfigDependencyKey();
  }

  /**
   * {@inheritdoc}
   */
  public function getConfigDependencyName() {
    return $this->entity
      ->getConfigDependencyName();
  }

  /**
   * {@inheritdoc}
   */
  public function getConfigTarget() {
    return $this->entity
      ->getConfigTarget();
  }

  /**
   * {@inheritdoc}
   */
  public function access($operation, AccountInterface $account = NULL, $return_as_object = FALSE) {
    return $this->entity
      ->access($operation, $account, $return_as_object);
  }

  /**
   * {@inheritdoc}
   */
  public function getCacheContexts() {
    return $this->entity
      ->getCacheContexts();
  }

  /**
   * {@inheritdoc}
   */
  public function getCacheTags() {
    return $this->entity
      ->getCacheTags();
  }

  /**
   * {@inheritdoc}
   */
  public function getCacheMaxAge() {
    return $this->entity
      ->getCacheMaxAge();
  }

  /**
   * {@inheritdoc}
   */
  public function addCacheContexts(array $cache_contexts) {
    $this->entity
      ->addCacheContexts($cache_contexts);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function addCacheTags(array $cache_tags) {
    $this->entity
      ->addCacheTags($cache_tags);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function mergeCacheMaxAge($max_age) {
    $this->entity
      ->mergeCacheMaxAge($max_age);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function addCacheableDependency($other_object) {
    $this->entity
      ->addCacheableDependency($other_object);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function setThirdPartySetting($module, $key, $value) {
    $this->entity
      ->setThirdPartySetting($module, $key, $value);
    return $this;
  }

  /**
   * {@inheritdoc}
   */
  public function getThirdPartySetting($module, $key, $default = NULL) {
    return $this->entity
      ->getThirdPartySetting($module, $key, $default);
  }

  /**
   * {@inheritdoc}
   */
  public function getThirdPartySettings($module) {
    return $this->entity
      ->getThirdPartySettings($module);
  }

  /**
   * {@inheritdoc}
   */
  public function unsetThirdPartySetting($module, $key) {
    return $this->entity
      ->unsetThirdPartySetting($module, $key);
  }

  /**
   * {@inheritdoc}
   */
  public function getThirdPartyProviders() {
    return $this->entity
      ->getThirdPartyProviders();
  }

}

Members

Namesort descending Modifiers Type Description Overrides
IndexInterface::DATASOURCE_ID_SEPARATOR constant String used to separate a datasource prefix from the rest of an identifier.
IndexInterface::PROPERTY_PATH_SEPARATOR constant String used to separate individual properties within a property path.
UnsavedIndexConfiguration::$currentUserId protected property Either the UID of the currently logged-in user, or the session ID.
UnsavedIndexConfiguration::$entity protected property The proxied index.
UnsavedIndexConfiguration::$entityTypeManager protected property The entity type manager.
UnsavedIndexConfiguration::$lock protected property The lock information for this configuration.
UnsavedIndexConfiguration::$tempStore protected property The shared temporary storage to use.
UnsavedIndexConfiguration::access public function Checks data value access. Overrides AccessibleInterface::access
UnsavedIndexConfiguration::addCacheableDependency public function Adds a dependency on an object: merges its cacheability metadata. Overrides RefinableCacheableDependencyInterface::addCacheableDependency
UnsavedIndexConfiguration::addCacheContexts public function Adds cache contexts. Overrides RefinableCacheableDependencyInterface::addCacheContexts
UnsavedIndexConfiguration::addCacheTags public function Adds cache tags. Overrides RefinableCacheableDependencyInterface::addCacheTags
UnsavedIndexConfiguration::addDatasource public function Adds a datasource to this index. Overrides IndexInterface::addDatasource
UnsavedIndexConfiguration::addField public function Adds a field to this index. Overrides IndexInterface::addField
UnsavedIndexConfiguration::addProcessor public function Adds a processor to this index. Overrides IndexInterface::addProcessor
UnsavedIndexConfiguration::alterIndexedItems public function Alter the items to be indexed. Overrides IndexInterface::alterIndexedItems
UnsavedIndexConfiguration::bundle public function Gets the bundle of the entity. Overrides EntityInterface::bundle
UnsavedIndexConfiguration::calculateDependencies public function Calculates dependencies and stores them in the dependency property. Overrides ConfigEntityInterface::calculateDependencies
UnsavedIndexConfiguration::clear public function Clears all indexed data from this index and marks it for reindexing. Overrides IndexInterface::clear
UnsavedIndexConfiguration::create public static function Constructs a new entity object, without permanently saving it. Overrides EntityInterface::create
UnsavedIndexConfiguration::createDuplicate public function Creates a duplicate of the entity. Overrides EntityInterface::createDuplicate
UnsavedIndexConfiguration::delete public function Deletes an entity permanently. Overrides EntityInterface::delete
UnsavedIndexConfiguration::disable public function Disables the configuration entity. Overrides ConfigEntityInterface::disable
UnsavedIndexConfiguration::discardChanges public function Discards the changes represented by this object. Overrides UnsavedConfigurationInterface::discardChanges
UnsavedIndexConfiguration::discardFieldChanges public function Resets the index's fields to the saved state. Overrides IndexInterface::discardFieldChanges
UnsavedIndexConfiguration::enable public function Enables the configuration entity. Overrides ConfigEntityInterface::enable
UnsavedIndexConfiguration::enforceIsNew public function Enforces an entity to be new. Overrides EntityInterface::enforceIsNew
UnsavedIndexConfiguration::get public function Returns the value of a property. Overrides ConfigEntityInterface::get
UnsavedIndexConfiguration::getCacheContexts public function The cache contexts associated with this object. Overrides CacheableDependencyInterface::getCacheContexts
UnsavedIndexConfiguration::getCacheMaxAge public function The maximum age for which this object may be cached. Overrides CacheableDependencyInterface::getCacheMaxAge
UnsavedIndexConfiguration::getCacheTags public function The cache tags associated with this object. Overrides CacheableDependencyInterface::getCacheTags
UnsavedIndexConfiguration::getCacheTagsToInvalidate public function Returns the cache tags that should be used to invalidate caches. Overrides EntityInterface::getCacheTagsToInvalidate
UnsavedIndexConfiguration::getConfigDependencyKey public function Gets the key that is used to store configuration dependencies. Overrides EntityInterface::getConfigDependencyKey
UnsavedIndexConfiguration::getConfigDependencyName public function Gets the configuration dependency name. Overrides EntityInterface::getConfigDependencyName
UnsavedIndexConfiguration::getConfigTarget public function Gets the configuration target identifier for the entity. Overrides EntityInterface::getConfigTarget
UnsavedIndexConfiguration::getDatasource public function Retrieves a specific datasource plugin for this index. Overrides IndexInterface::getDatasource
UnsavedIndexConfiguration::getDatasourceIds public function Retrieves the IDs of all datasources enabled for this index. Overrides IndexInterface::getDatasourceIds
UnsavedIndexConfiguration::getDatasources public function Retrieves this index's datasource plugins. Overrides IndexInterface::getDatasources
UnsavedIndexConfiguration::getDependencies public function Gets the configuration dependencies. Overrides ConfigEntityInterface::getDependencies
UnsavedIndexConfiguration::getDescription public function Retrieves the index description. Overrides IndexInterface::getDescription
UnsavedIndexConfiguration::getEntityType public function Gets the entity type definition. Overrides EntityInterface::getEntityType
UnsavedIndexConfiguration::getEntityTypeId public function Gets the ID of the type of the entity. Overrides EntityInterface::getEntityTypeId
UnsavedIndexConfiguration::getEntityTypeManager public function Retrieves the entity type manager.
UnsavedIndexConfiguration::getEntityTypes public function Retrieves all entity types contained in this index. Overrides IndexInterface::getEntityTypes
UnsavedIndexConfiguration::getField public function Returns a field from this index. Overrides IndexInterface::getField
UnsavedIndexConfiguration::getFieldRenames public function Retrieves all field IDs that changed compared to the index's saved version. Overrides IndexInterface::getFieldRenames
UnsavedIndexConfiguration::getFields public function Returns a list of all indexed fields of this index. Overrides IndexInterface::getFields
UnsavedIndexConfiguration::getFieldsByDatasource public function Returns a list of all indexed fields of a specific datasource. Overrides IndexInterface::getFieldsByDatasource
UnsavedIndexConfiguration::getFulltextFields public function Retrieves all of this index's fulltext fields. Overrides IndexInterface::getFulltextFields
UnsavedIndexConfiguration::getLastUpdated public function Retrieves the last updated date of this configuration, if any. Overrides UnsavedConfigurationInterface::getLastUpdated
UnsavedIndexConfiguration::getLockOwner public function Retrieves the owner of the lock on this configuration, if any. Overrides UnsavedConfigurationInterface::getLockOwner
UnsavedIndexConfiguration::getOption public function Retrieves an option. Overrides IndexInterface::getOption
UnsavedIndexConfiguration::getOptions public function Retrieves an array of all options. Overrides IndexInterface::getOptions
UnsavedIndexConfiguration::getOriginalId public function Gets the original ID. Overrides EntityInterface::getOriginalId
UnsavedIndexConfiguration::getProcessor public function Retrieves a specific processor plugin for this index. Overrides IndexInterface::getProcessor
UnsavedIndexConfiguration::getProcessors public function Retrieves this index's processors. Overrides IndexInterface::getProcessors
UnsavedIndexConfiguration::getProcessorsByStage public function Loads this index's processors for a specific stage. Overrides IndexInterface::getProcessorsByStage
UnsavedIndexConfiguration::getPropertyDefinitions public function Retrieves the properties of one of this index's datasources. Overrides IndexInterface::getPropertyDefinitions
UnsavedIndexConfiguration::getServerId public function Retrieves the ID of the server the index is attached to. Overrides IndexInterface::getServerId
UnsavedIndexConfiguration::getServerInstance public function Retrieves the server the index is attached to. Overrides IndexInterface::getServerInstance
UnsavedIndexConfiguration::getThirdPartyProviders public function Gets the list of third parties that store information. Overrides ThirdPartySettingsInterface::getThirdPartyProviders
UnsavedIndexConfiguration::getThirdPartySetting public function Gets the value of a third-party setting. Overrides ThirdPartySettingsInterface::getThirdPartySetting
UnsavedIndexConfiguration::getThirdPartySettings public function Gets all third-party settings of a given module. Overrides ThirdPartySettingsInterface::getThirdPartySettings
UnsavedIndexConfiguration::getTrackerId public function Retrieves the tracker plugin's ID. Overrides IndexInterface::getTrackerId
UnsavedIndexConfiguration::getTrackerInstance public function Retrieves the tracker plugin. Overrides IndexInterface::getTrackerInstance
UnsavedIndexConfiguration::getTypedData public function Gets a typed data object for this entity object. Overrides EntityInterface::getTypedData
UnsavedIndexConfiguration::hasChanges public function Determines if there are any unsaved changes in this configuration. Overrides UnsavedConfigurationInterface::hasChanges
UnsavedIndexConfiguration::hasLinkTemplate public function Indicates if a link template exists for a given key. Overrides EntityInterface::hasLinkTemplate
UnsavedIndexConfiguration::hasTrustedData public function Gets whether on not the data is trusted. Overrides ConfigEntityInterface::hasTrustedData
UnsavedIndexConfiguration::hasValidServer public function Determines whether this index is lying on a valid server. Overrides IndexInterface::hasValidServer
UnsavedIndexConfiguration::hasValidTracker public function Determines whether the tracker is valid. Overrides IndexInterface::hasValidTracker
UnsavedIndexConfiguration::id public function Gets the identifier. Overrides EntityInterface::id
UnsavedIndexConfiguration::indexItems public function Indexes a set amount of items. Overrides IndexInterface::indexItems
UnsavedIndexConfiguration::indexSpecificItems public function Indexes some objects on this index. Overrides IndexInterface::indexSpecificItems
UnsavedIndexConfiguration::isBatchTracking public function Determines whether the index is currently in "batch tracking" mode. Overrides IndexInterface::isBatchTracking
UnsavedIndexConfiguration::isInstallable public function Checks whether this entity is installable. Overrides ConfigEntityInterface::isInstallable
UnsavedIndexConfiguration::isLocked public function Determines whether this configuration was saved by a different user. Overrides UnsavedConfigurationInterface::isLocked
UnsavedIndexConfiguration::isNew public function Determines whether the entity is new. Overrides EntityInterface::isNew
UnsavedIndexConfiguration::isReadOnly public function Determines whether this index is read-only. Overrides IndexInterface::isReadOnly
UnsavedIndexConfiguration::isReindexing public function Determines whether reindexing has been triggered in this page request. Overrides IndexInterface::isReindexing
UnsavedIndexConfiguration::isServerEnabled public function Checks if this index has an enabled server. Overrides IndexInterface::isServerEnabled
UnsavedIndexConfiguration::isSyncing public function Returns whether this entity is being changed as part of a synchronization. Overrides SynchronizableInterface::isSyncing
UnsavedIndexConfiguration::isUninstalling public function Returns whether this entity is being changed during the uninstall process. Overrides ConfigEntityInterface::isUninstalling
UnsavedIndexConfiguration::isValidDatasource public function Determines whether the given datasource ID is valid for this index. Overrides IndexInterface::isValidDatasource
UnsavedIndexConfiguration::isValidProcessor public function Determines whether the given processor ID is valid for this index. Overrides IndexInterface::isValidProcessor
UnsavedIndexConfiguration::label public function Gets the label of the entity. Overrides EntityInterface::label
UnsavedIndexConfiguration::language public function Gets the language of the entity. Overrides EntityInterface::language
UnsavedIndexConfiguration::link public function Deprecated way of generating a link to the entity. See toLink(). Overrides EntityInterface::link
UnsavedIndexConfiguration::load public static function Loads an entity. Overrides EntityInterface::load
UnsavedIndexConfiguration::loadItem public function Loads a single search object of this index. Overrides IndexInterface::loadItem
UnsavedIndexConfiguration::loadItemsMultiple public function Loads multiple search objects for this index. Overrides IndexInterface::loadItemsMultiple
UnsavedIndexConfiguration::loadMultiple public static function Loads one or more entities. Overrides EntityInterface::loadMultiple
UnsavedIndexConfiguration::mergeCacheMaxAge public function Merges the maximum age (in seconds) with the existing maximum age. Overrides RefinableCacheableDependencyInterface::mergeCacheMaxAge
UnsavedIndexConfiguration::onDependencyRemoval public function Informs the entity that entities it depends on will be deleted. Overrides ConfigEntityInterface::onDependencyRemoval
UnsavedIndexConfiguration::postCreate public function Acts on a created entity before hooks are invoked. Overrides EntityInterface::postCreate
UnsavedIndexConfiguration::postDelete public static function Acts on deleted entities before the delete hook is invoked. Overrides EntityInterface::postDelete
UnsavedIndexConfiguration::postLoad public static function Acts on loaded entities. Overrides EntityInterface::postLoad
UnsavedIndexConfiguration::postprocessSearchResults public function Postprocesses search results before they are displayed. Overrides IndexInterface::postprocessSearchResults
UnsavedIndexConfiguration::postSave public function Acts on a saved entity before the insert or update hook is invoked. Overrides EntityInterface::postSave
UnsavedIndexConfiguration::preCreate public static function Changes the values of an entity before it is created. Overrides EntityInterface::preCreate
UnsavedIndexConfiguration::preDelete public static function Acts on entities before they are deleted and before hooks are invoked. Overrides EntityInterface::preDelete
UnsavedIndexConfiguration::preprocessIndexItems public function Preprocesses data items for indexing. Overrides IndexInterface::preprocessIndexItems
UnsavedIndexConfiguration::preprocessSearchQuery public function Preprocesses a search query. Overrides IndexInterface::preprocessSearchQuery
UnsavedIndexConfiguration::preSave public function Acts on an entity before the presave hook is invoked. Overrides EntityInterface::preSave
UnsavedIndexConfiguration::query public function Creates a query object for this index. Overrides IndexInterface::query
UnsavedIndexConfiguration::rebuildTracker public function Starts a rebuild of the index's tracking information. Overrides IndexInterface::rebuildTracker
UnsavedIndexConfiguration::referencedEntities public function Gets a list of entities referenced by this entity. Overrides EntityInterface::referencedEntities
UnsavedIndexConfiguration::reindex public function Marks all items in this index for reindexing. Overrides IndexInterface::reindex
UnsavedIndexConfiguration::removeDatasource public function Removes a datasource from this index. Overrides IndexInterface::removeDatasource
UnsavedIndexConfiguration::removeField public function Removes a field from the index. Overrides IndexInterface::removeField
UnsavedIndexConfiguration::removeProcessor public function Removes a processor from this index. Overrides IndexInterface::removeProcessor
UnsavedIndexConfiguration::renameField public function Changes the field ID of a field. Overrides IndexInterface::renameField
UnsavedIndexConfiguration::save public function Saves an entity permanently. Overrides EntityInterface::save
UnsavedIndexConfiguration::savePermanent public function Saves the changes represented by this object permanently. Overrides UnsavedConfigurationInterface::savePermanent
UnsavedIndexConfiguration::set public function Sets the value of a property. Overrides ConfigEntityInterface::set
UnsavedIndexConfiguration::setCurrentUserId public function Sets the current user ID. Overrides UnsavedConfigurationInterface::setCurrentUserId
UnsavedIndexConfiguration::setDatasources public function Sets this index's datasource plugins. Overrides IndexInterface::setDatasources
UnsavedIndexConfiguration::setEntityTypeManager public function Sets the entity type manager.
UnsavedIndexConfiguration::setFields public function Sets this index's fields. Overrides IndexInterface::setFields
UnsavedIndexConfiguration::setLockInformation public function Sets the lock information for this configuration. Overrides UnsavedConfigurationInterface::setLockInformation
UnsavedIndexConfiguration::setOption public function Sets an option. Overrides IndexInterface::setOption
UnsavedIndexConfiguration::setOptions public function Sets the index's options. Overrides IndexInterface::setOptions
UnsavedIndexConfiguration::setOriginalId public function Sets the original ID. Overrides EntityInterface::setOriginalId
UnsavedIndexConfiguration::setProcessors public function Sets this index's processor plugins. Overrides IndexInterface::setProcessors
UnsavedIndexConfiguration::setServer public function Sets the server the index is attached to. Overrides IndexInterface::setServer
UnsavedIndexConfiguration::setStatus public function Sets the status of the configuration entity. Overrides ConfigEntityInterface::setStatus
UnsavedIndexConfiguration::setSyncing public function Sets the status of the synchronization flag. Overrides SynchronizableInterface::setSyncing
UnsavedIndexConfiguration::setThirdPartySetting public function Sets the value of a third-party setting. Overrides ThirdPartySettingsInterface::setThirdPartySetting
UnsavedIndexConfiguration::setTracker public function Sets the tracker the index uses. Overrides IndexInterface::setTracker
UnsavedIndexConfiguration::startBatchTracking public function Puts the index into "batch tracking" mode. Overrides IndexInterface::startBatchTracking
UnsavedIndexConfiguration::status public function Returns whether the configuration entity is enabled. Overrides ConfigEntityInterface::status
UnsavedIndexConfiguration::stopBatchTracking public function Stop the latest initialized "batch tracking" mode for the index. Overrides IndexInterface::stopBatchTracking
UnsavedIndexConfiguration::toArray public function Gets an array of all property values. Overrides EntityInterface::toArray
UnsavedIndexConfiguration::toLink public function Generates the HTML for a link to this entity. Overrides EntityInterface::toLink
UnsavedIndexConfiguration::toUrl public function Gets the URL object for the entity. Overrides EntityInterface::toUrl
UnsavedIndexConfiguration::trackItemsDeleted public function Deletes items from the index. Overrides IndexInterface::trackItemsDeleted
UnsavedIndexConfiguration::trackItemsInserted public function Adds items from a specific datasource to the index. Overrides IndexInterface::trackItemsInserted
UnsavedIndexConfiguration::trackItemsUpdated public function Updates items from a specific datasource present in the index. Overrides IndexInterface::trackItemsUpdated
UnsavedIndexConfiguration::trustData public function Sets that the data should be trusted. Overrides ConfigEntityInterface::trustData
UnsavedIndexConfiguration::unsetThirdPartySetting public function Unsets a third-party setting. Overrides ThirdPartySettingsInterface::unsetThirdPartySetting
UnsavedIndexConfiguration::uriRelationships public function Gets a list of URI relationships supported by this entity. Overrides EntityInterface::uriRelationships
UnsavedIndexConfiguration::url public function Gets the public URL for this entity. Overrides EntityInterface::url
UnsavedIndexConfiguration::urlInfo public function Gets the URL object for the entity. Overrides EntityInterface::urlInfo
UnsavedIndexConfiguration::uuid public function Gets the entity UUID (Universally Unique Identifier). Overrides EntityInterface::uuid
UnsavedIndexConfiguration::__construct public function Constructs a new UnsavedIndexConfiguration.