class Server in Search API 8
Defines the search server configuration entity.
Plugin annotation
@ConfigEntityType(
id = "search_api_server",
label = @Translation("Search server"),
label_collection = @Translation("Search servers"),
label_singular = @Translation("search server"),
label_plural = @Translation("search servers"),
label_count = @PluralTranslation(
singular = "@count search server",
plural = "@count search servers",
),
handlers = {
"storage" = "Drupal\search_api\Entity\SearchApiConfigEntityStorage",
"form" = {
"default" = "Drupal\search_api\Form\ServerForm",
"edit" = "Drupal\search_api\Form\ServerForm",
"delete" = "Drupal\search_api\Form\ServerDeleteConfirmForm",
"disable" = "Drupal\search_api\Form\ServerDisableConfirmForm",
"clear" = "Drupal\search_api\Form\ServerClearConfirmForm",
},
},
admin_permission = "administer search_api",
config_prefix = "server",
entity_keys = {
"id" = "id",
"label" = "name",
"uuid" = "uuid",
"status" = "status",
},
config_export = {
"id",
"name",
"description",
"backend",
"backend_config",
},
links = {
"canonical" = "/admin/config/search/search-api/server/{search_api_server}",
"add-form" = "/admin/config/search/search-api/add-server",
"edit-form" = "/admin/config/search/search-api/server/{search_api_server}/edit",
"delete-form" = "/admin/config/search/search-api/server/{search_api_server}/delete",
"disable" = "/admin/config/search/search-api/server/{search_api_server}/disable",
"enable" = "/admin/config/search/search-api/server/{search_api_server}/enable",
}
)
Hierarchy
- class \Drupal\Core\Entity\EntityBase implements EntityInterface uses RefinableCacheableDependencyTrait, DependencySerializationTrait
- class \Drupal\Core\Config\Entity\ConfigEntityBase implements ConfigEntityInterface uses SynchronizableEntityTrait, PluginDependencyTrait
- class \Drupal\search_api\Entity\Server implements ServerInterface uses InstallingTrait, LoggerTrait
- class \Drupal\Core\Config\Entity\ConfigEntityBase implements ConfigEntityInterface uses SynchronizableEntityTrait, PluginDependencyTrait
Expanded class hierarchy of Server
27 files declare their use of Server
- BackendPluginBase.php in src/
Backend/ BackendPluginBase.php - BackendTest.php in modules/
search_api_db/ tests/ src/ Kernel/ BackendTest.php - BackendTestBase.php in tests/
src/ Kernel/ BackendTestBase.php - CliTest.php in tests/
src/ Kernel/ System/ CliTest.php - CommandHelperTest.php in tests/
src/ Kernel/ System/ CommandHelperTest.php
6 string references to 'Server'
- drush_search_api_list in ./
search_api.drush.inc - Prints a list of all search indexes.
- IndexForm::buildEntityForm in src/
Form/ IndexForm.php - Builds the form for the basic index properties.
- IndexListBuilder::buildRow in src/
IndexListBuilder.php - Builds a row for an entity in the entity listing.
- template_preprocess_search_api_index in ./
search_api.theme.inc - Prepares variables for search_api_index templates.
- tour.tour.search-api-index-form.yml in config/
optional/ tour.tour.search-api-index-form.yml - config/optional/tour.tour.search-api-index-form.yml
File
- src/
Entity/ Server.php, line 65
Namespace
Drupal\search_api\EntityView source
class Server extends ConfigEntityBase implements ServerInterface {
use InstallingTrait;
use LoggerTrait;
/**
* The ID of the server.
*
* @var string
*/
protected $id;
/**
* The displayed name of the server.
*
* @var string
*/
protected $name;
/**
* The displayed description of the server.
*
* @var string
*/
protected $description = '';
/**
* The ID of the backend plugin.
*
* @var string
*/
protected $backend;
/**
* The backend plugin configuration.
*
* @var array
*/
protected $backend_config = [];
/**
* The backend plugin instance.
*
* @var \Drupal\search_api\Backend\BackendInterface
*/
protected $backendPlugin;
/**
* The features this server supports.
*
* @var string[]|null
*/
protected $features;
/**
* {@inheritdoc}
*/
public function getDescription() {
return $this->description;
}
/**
* {@inheritdoc}
*/
public function hasValidBackend() {
$backend_plugin_definition = \Drupal::service('plugin.manager.search_api.backend')
->getDefinition($this
->getBackendId(), FALSE);
return !empty($backend_plugin_definition);
}
/**
* {@inheritdoc}
*/
public function getBackendId() {
return $this->backend;
}
/**
* {@inheritdoc}
*/
public function getBackend() {
if (!$this->backendPlugin) {
$backend_plugin_manager = \Drupal::service('plugin.manager.search_api.backend');
$config = $this->backend_config;
$config['#server'] = $this;
if (!($this->backendPlugin = $backend_plugin_manager
->createInstance($this
->getBackendId(), $config))) {
$backend_id = $this
->getBackendId();
$label = $this
->label();
throw new SearchApiException("The backend with ID '{$backend_id}' could not be retrieved for server '{$label}'.");
}
}
return $this->backendPlugin;
}
/**
* {@inheritdoc}
*/
public function getBackendConfig() {
return $this->backend_config;
}
/**
* {@inheritdoc}
*/
public function setBackendConfig(array $backend_config) {
$this->backend_config = $backend_config;
// In case the backend plugin is already loaded, make sure the configuration
// stays in sync.
if ($this->backendPlugin && $this
->getBackend()
->getConfiguration() !== $backend_config) {
$this
->getBackend()
->setConfiguration($backend_config);
}
return $this;
}
/**
* {@inheritdoc}
*/
public function getIndexes(array $properties = []) {
$storage = \Drupal::entityTypeManager()
->getStorage('search_api_index');
return $storage
->loadByProperties([
'server' => $this
->id(),
] + $properties);
}
/**
* {@inheritdoc}
*/
public function viewSettings() {
return $this
->hasValidBackend() ? $this
->getBackend()
->viewSettings() : [];
}
/**
* {@inheritdoc}
*/
public function isAvailable() {
return $this
->hasValidBackend() ? $this
->getBackend()
->isAvailable() : FALSE;
}
/**
* {@inheritdoc}
*/
public function supportsFeature($feature) {
return in_array($feature, $this
->getSupportedFeatures());
}
/**
* {@inheritdoc}
*/
public function getSupportedFeatures() {
if (!isset($this->features)) {
$this->features = [];
if ($this
->hasValidBackend()) {
$this->features = $this
->getBackend()
->getSupportedFeatures();
}
$description = 'This hook is deprecated in search_api:8.x-1.14 and is removed from search_api:2.0.0. Please use the "search_api.determining_server_features" event instead. See https://www.drupal.org/node/3059866';
\Drupal::moduleHandler()
->alterDeprecated($description, 'search_api_server_features', $this->features, $this);
/** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher */
$eventDispatcher = \Drupal::getContainer()
->get('event_dispatcher');
$eventDispatcher
->dispatch(SearchApiEvents::DETERMINING_SERVER_FEATURES, new DeterminingServerFeaturesEvent($this->features, $this));
}
return $this->features;
}
/**
* {@inheritdoc}
*/
public function supportsDataType($type) {
if ($this
->hasValidBackend()) {
return $this
->getBackend()
->supportsDataType($type);
}
return FALSE;
}
/**
* {@inheritdoc}
*/
public function getDiscouragedProcessors() {
if ($this
->hasValidBackend()) {
return $this
->getBackend()
->getDiscouragedProcessors();
}
return [];
}
/**
* {@inheritdoc}
*/
public function getBackendDefinedFields(IndexInterface $index) {
if ($this
->hasValidBackend()) {
return $this
->getBackend()
->getBackendDefinedFields($index);
}
return [];
}
/**
* {@inheritdoc}
*/
public function addIndex(IndexInterface $index) {
$server_task_manager = \Drupal::getContainer()
->get('search_api.server_task_manager');
// When freshly adding an index to a server, it doesn't make any sense to
// execute possible other tasks for that server/index combination.
// (removeIndex() is implicit when adding an index which was already added.)
$server_task_manager
->delete($this, $index);
try {
if ($server_task_manager
->execute($this)) {
$this
->getBackend()
->addIndex($index);
return;
}
} catch (SearchApiException $e) {
$vars = [
'%server' => $this
->label(),
'%index' => $index
->label(),
];
$this
->logException($e, '%type while adding index %index to server %server: @message in %function (line %line of %file).', $vars);
}
$task_manager = \Drupal::getContainer()
->get('search_api.task_manager');
$task_manager
->addTask(__FUNCTION__, $this, $index);
}
/**
* {@inheritdoc}
*/
public function updateIndex(IndexInterface $index) {
$server_task_manager = \Drupal::getContainer()
->get('search_api.server_task_manager');
try {
if ($server_task_manager
->execute($this)) {
$this
->getBackend()
->updateIndex($index);
return;
}
} catch (SearchApiException $e) {
$vars = [
'%server' => $this
->label(),
'%index' => $index
->label(),
];
$this
->logException($e, '%type while updating the fields of index %index on server %server: @message in %function (line %line of %file).', $vars);
}
$task_manager = \Drupal::getContainer()
->get('search_api.task_manager');
$task_manager
->addTask(__FUNCTION__, $this, $index, $index->original ?? NULL);
}
/**
* {@inheritdoc}
*/
public function removeIndex($index) {
$server_task_manager = \Drupal::getContainer()
->get('search_api.server_task_manager');
// When removing an index from a server, it doesn't make any sense anymore
// to delete items from it, or react to other changes.
$server_task_manager
->delete($this, $index);
try {
if ($server_task_manager
->execute($this)) {
$this
->getBackend()
->removeIndex($index);
return;
}
} catch (SearchApiException $e) {
$vars = [
'%server' => $this
->label(),
'%index' => is_object($index) ? $index
->label() : $index,
];
$this
->logException($e, '%type while removing index %index from server %server: @message in %function (line %line of %file).', $vars);
}
$task_manager = \Drupal::getContainer()
->get('search_api.task_manager');
$data = NULL;
if (!is_object($index)) {
$data = $index;
$index = NULL;
}
$task_manager
->addTask(__FUNCTION__, $this, $index, $data);
}
/**
* {@inheritdoc}
*/
public function indexItems(IndexInterface $index, array $items) {
$server_task_manager = \Drupal::getContainer()
->get('search_api.server_task_manager');
if ($server_task_manager
->execute($this)) {
return $this
->getBackend()
->indexItems($index, $items);
}
$index_label = $index
->label();
throw new SearchApiException("Could not index items on index '{$index_label}' because pending server tasks could not be executed.");
}
/**
* {@inheritdoc}
*/
public function deleteItems(IndexInterface $index, array $item_ids) {
if ($index
->isReadOnly()) {
$vars = [
'%index' => $index
->label(),
];
$this
->getLogger()
->warning('Trying to delete items from index %index which is marked as read-only.', $vars);
return;
}
$server_task_manager = \Drupal::getContainer()
->get('search_api.server_task_manager');
try {
if ($server_task_manager
->execute($this)) {
$this
->getBackend()
->deleteItems($index, $item_ids);
// Clear search api list caches.
Cache::invalidateTags([
'search_api_list:' . $index
->id(),
]);
return;
}
} catch (SearchApiException $e) {
$vars = [
'%server' => $this
->label(),
];
$this
->logException($e, '%type while deleting items from server %server: @message in %function (line %line of %file).', $vars);
}
$task_manager = \Drupal::getContainer()
->get('search_api.task_manager');
$task_manager
->addTask(__FUNCTION__, $this, $index, $item_ids);
}
/**
* {@inheritdoc}
*/
public function deleteAllIndexItems(IndexInterface $index, $datasource_id = NULL) {
if ($index
->isReadOnly()) {
$vars = [
'%index' => $index
->label(),
];
$this
->getLogger()
->warning('Trying to delete items from index %index which is marked as read-only.', $vars);
return;
}
$server_task_manager = \Drupal::getContainer()
->get('search_api.server_task_manager');
if (!$datasource_id) {
// If we're deleting all items of the index, there's no point in keeping
// any other "delete items" tasks.
$types = [
'deleteItems',
'deleteAllIndexItems',
];
$server_task_manager
->delete($this, $index, $types);
}
try {
if ($server_task_manager
->execute($this)) {
$this
->getBackend()
->deleteAllIndexItems($index, $datasource_id);
// Clear search api list caches.
Cache::invalidateTags([
'search_api_list:' . $index
->id(),
]);
return;
}
} catch (SearchApiException $e) {
$vars = [
'%server' => $this
->label(),
'%index' => $index
->label(),
];
$this
->logException($e, '%type while deleting items of index %index from server %server: @message in %function (line %line of %file).', $vars);
}
$task_manager = \Drupal::getContainer()
->get('search_api.task_manager');
$task_manager
->addTask(__FUNCTION__, $this, $index, $datasource_id);
}
/**
* {@inheritdoc}
*/
public function deleteAllItems() {
$failed = [];
$properties['status'] = TRUE;
$properties['read_only'] = FALSE;
foreach ($this
->getIndexes($properties) as $index) {
try {
$this
->getBackend()
->deleteAllIndexItems($index);
Cache::invalidateTags([
'search_api_list:' . $index
->id(),
]);
} catch (SearchApiException $e) {
$args = [
'%index' => $index
->label(),
];
$this
->logException($e, '%type while deleting all items from index %index: @message in %function (line %line of %file).', $args);
$failed[] = $index
->label();
}
}
if (!empty($e)) {
$server_name = $this
->label();
$failed = implode(', ', $failed);
throw new SearchApiException("Deleting all items from server '{$server_name}' failed for the following (write-enabled) indexes: {$failed}.", 0, $e);
}
$types = [
'deleteItems',
'deleteAllIndexItems',
];
\Drupal::getContainer()
->get('search_api.server_task_manager')
->delete($this, NULL, $types);
}
/**
* {@inheritdoc}
*/
public function search(QueryInterface $query) {
$this
->getBackend()
->search($query);
}
/**
* {@inheritdoc}
*/
public function preSave(EntityStorageInterface $storage) {
parent::preSave($storage);
// The rest of the code only applies to updates.
if (!isset($this->original)) {
return;
}
// Retrieve active config overrides for this server.
$overrides = Utility::getConfigOverrides($this);
// If there are overrides for the backend or its configuration, attempt to
// apply them for the preUpdate() call.
if (isset($overrides['backend']) || isset($overrides['backend_config'])) {
$backend_config = $this
->getBackendConfig();
if (isset($overrides['backend_config'])) {
$backend_config = $overrides['backend_config'];
}
$backend_id = $this
->getBackendId();
if (isset($overrides['backend'])) {
$backend_id = $overrides['backend'];
}
$backend_plugin_manager = \Drupal::service('plugin.manager.search_api.backend');
$backend_config['#server'] = $this;
if (!($backend = $backend_plugin_manager
->createInstance($backend_id, $backend_config))) {
$label = $this
->label();
throw new SearchApiException("The backend with ID '{$backend_id}' could not be retrieved for server '{$label}'.");
}
}
else {
$backend = $this
->getBackend();
}
$backend
->preUpdate();
// If the server is being disabled, also disable all its indexes.
if (!$this
->isSyncing() && !$this
->isInstallingFromExtension() && !isset($overrides['status']) && !$this
->status() && $this->original
->status()) {
foreach ($this
->getIndexes([
'status' => TRUE,
]) as $index) {
/** @var \Drupal\search_api\IndexInterface $index */
$index
->setStatus(FALSE)
->save();
}
}
}
/**
* {@inheritdoc}
*/
public function postSave(EntityStorageInterface $storage, $update = TRUE) {
if ($this
->hasValidBackend()) {
if ($update) {
$reindexing_necessary = $this
->getBackend()
->postUpdate();
if ($reindexing_necessary) {
foreach ($this
->getIndexes() as $index) {
$index
->reindex();
}
}
}
else {
$this
->getBackend()
->postInsert();
}
}
}
/**
* {@inheritdoc}
*/
public static function preDelete(EntityStorageInterface $storage, array $entities) {
// @todo This will, via Index::onDependencyRemoval(), remove all indexes
// from this server, triggering the server's removeIndex() method. This
// is, at best, wasted performance and could at worst lead to a bug if
// removeIndex() saves the server. We should try what happens when this is
// the case, whether there really is a bug, and try to fix it somehow –
// maybe clever detection of this case in removeIndex() or
// Index::postSave(). $server->isUninstalling() might help?
parent::preDelete($storage, $entities);
// Iterate through the servers, executing the backends' preDelete() methods
// and removing all their pending server tasks.
foreach ($entities as $server) {
/** @var \Drupal\search_api\ServerInterface $server */
if ($server
->hasValidBackend()) {
$server
->getBackend()
->preDelete();
}
\Drupal::getContainer()
->get('search_api.server_task_manager')
->delete($server);
}
}
/**
* {@inheritdoc}
*/
public function calculateDependencies() {
parent::calculateDependencies();
// Add the backend's dependencies.
if ($this
->hasValidBackend()) {
$this
->calculatePluginDependencies($this
->getBackend());
}
return $this;
}
/**
* {@inheritdoc}
*/
public function onDependencyRemoval(array $dependencies) {
$changed = parent::onDependencyRemoval($dependencies);
if ($this
->hasValidBackend()) {
$removed_backend_dependencies = [];
$backend = $this
->getBackend();
foreach ($backend
->calculateDependencies() as $dependency_type => $list) {
if (isset($dependencies[$dependency_type])) {
$removed_backend_dependencies[$dependency_type] = array_intersect_key($dependencies[$dependency_type], array_flip($list));
}
}
$removed_backend_dependencies = array_filter($removed_backend_dependencies);
if ($removed_backend_dependencies) {
if ($backend
->onDependencyRemoval($removed_backend_dependencies)) {
$this->backend_config = $backend
->getConfiguration();
$changed = TRUE;
}
}
}
return $changed;
}
/**
* Implements the magic __clone() method.
*
* Prevents the backend plugin instance from being cloned.
*/
public function __clone() {
$this->backendPlugin = NULL;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CacheableDependencyTrait:: |
protected | property | Cache contexts. | |
CacheableDependencyTrait:: |
protected | property | Cache max-age. | |
CacheableDependencyTrait:: |
protected | property | Cache tags. | |
CacheableDependencyTrait:: |
protected | function | Sets cacheability; useful for value object constructors. | |
ConfigEntityBase:: |
private | property | Whether the config is being deleted by the uninstall process. | |
ConfigEntityBase:: |
protected | property | The language code of the entity's default language. | |
ConfigEntityBase:: |
protected | property | The original ID of the configuration entity. | |
ConfigEntityBase:: |
protected | property | The enabled/disabled status of the configuration entity. | 4 |
ConfigEntityBase:: |
protected | property | Third party entity settings. | |
ConfigEntityBase:: |
protected | property | Trust supplied data and not use configuration schema on save. | |
ConfigEntityBase:: |
protected | property | The UUID for this entity. | |
ConfigEntityBase:: |
protected | property | Information maintained by Drupal core about configuration. | |
ConfigEntityBase:: |
protected | function | Overrides \Drupal\Core\Entity\DependencyTrait:addDependency(). | |
ConfigEntityBase:: |
public | function |
Creates a duplicate of the entity. Overrides EntityBase:: |
1 |
ConfigEntityBase:: |
public | function |
Disables the configuration entity. Overrides ConfigEntityInterface:: |
1 |
ConfigEntityBase:: |
public | function |
Enables the configuration entity. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Returns the value of a property. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Returns the cache tags that should be used to invalidate caches. Overrides EntityBase:: |
1 |
ConfigEntityBase:: |
public | function |
Gets the configuration dependency name. Overrides EntityBase:: |
|
ConfigEntityBase:: |
protected static | function | Gets the configuration manager. | |
ConfigEntityBase:: |
public | function |
Gets the configuration target identifier for the entity. Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Gets the configuration dependencies. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Gets the original ID. Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Gets the list of third parties that store information. Overrides ThirdPartySettingsInterface:: |
|
ConfigEntityBase:: |
public | function |
Gets the value of a third-party setting. Overrides ThirdPartySettingsInterface:: |
|
ConfigEntityBase:: |
public | function |
Gets all third-party settings of a given module. Overrides ThirdPartySettingsInterface:: |
|
ConfigEntityBase:: |
protected | function | Gets the typed config manager. | |
ConfigEntityBase:: |
public | function |
Gets whether on not the data is trusted. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
protected static | function |
Override to never invalidate the individual entities' cache tags; the
config system already invalidates them. Overrides EntityBase:: |
|
ConfigEntityBase:: |
protected | function |
Override to never invalidate the entity's cache tag; the config system
already invalidates it. Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Checks whether this entity is installable. Overrides ConfigEntityInterface:: |
2 |
ConfigEntityBase:: |
public | function |
Returns whether this entity is being changed during the uninstall process. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Deprecated way of generating a link to the entity. See toLink(). Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Saves an entity permanently. Overrides EntityBase:: |
1 |
ConfigEntityBase:: |
public | function |
Sets the value of a property. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Sets the original ID. Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Sets the status of the configuration entity. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Sets the value of a third-party setting. Overrides ThirdPartySettingsInterface:: |
|
ConfigEntityBase:: |
public | function | ||
ConfigEntityBase:: |
public static | function | Helper callback for uasort() to sort configuration entities by weight and label. | 6 |
ConfigEntityBase:: |
public | function |
Returns whether the configuration entity is enabled. Overrides ConfigEntityInterface:: |
4 |
ConfigEntityBase:: |
public | function |
Gets an array of all property values. Overrides EntityBase:: |
2 |
ConfigEntityBase:: |
public | function |
Gets the URL object for the entity. Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Sets that the data should be trusted. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Unsets a third-party setting. Overrides ThirdPartySettingsInterface:: |
|
ConfigEntityBase:: |
public | function |
Gets the public URL for this entity. Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Gets the URL object for the entity. Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Constructs an Entity object. Overrides EntityBase:: |
10 |
ConfigEntityBase:: |
public | function |
Overrides EntityBase:: |
4 |
DependencySerializationTrait:: |
protected | property | An array of entity type IDs keyed by the property name of their storages. | |
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | Aliased as: traitSleep | 1 |
DependencySerializationTrait:: |
public | function | 2 | |
DependencyTrait:: |
protected | property | The object's dependencies. | |
DependencyTrait:: |
protected | function | Adds multiple dependencies. | |
DependencyTrait:: |
protected | function | Adds a dependency. Aliased as: addDependencyTrait | |
EntityBase:: |
protected | property | Boolean indicating whether the entity should be forced to be new. | |
EntityBase:: |
protected | property | The entity type. | |
EntityBase:: |
protected | property | A typed data object wrapping this entity. | |
EntityBase:: |
public | function |
Checks data value access. Overrides AccessibleInterface:: |
1 |
EntityBase:: |
public | function |
Gets the bundle of the entity. Overrides EntityInterface:: |
1 |
EntityBase:: |
public static | function |
Constructs a new entity object, without permanently saving it. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Deletes an entity permanently. Overrides EntityInterface:: |
2 |
EntityBase:: |
public | function |
Enforces an entity to be new. Overrides EntityInterface:: |
|
EntityBase:: |
protected | function | Gets the entity manager. | |
EntityBase:: |
protected | function | Gets the entity type bundle info service. | |
EntityBase:: |
protected | function | Gets the entity type manager. | |
EntityBase:: |
public | function |
The cache contexts associated with this object. Overrides CacheableDependencyTrait:: |
|
EntityBase:: |
public | function |
The maximum age for which this object may be cached. Overrides CacheableDependencyTrait:: |
|
EntityBase:: |
public | function |
The cache tags associated with this object. Overrides CacheableDependencyTrait:: |
|
EntityBase:: |
public | function |
Gets the key that is used to store configuration dependencies. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Gets the entity type definition. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Gets the ID of the type of the entity. Overrides EntityInterface:: |
|
EntityBase:: |
protected | function | The list cache tags to invalidate for this entity. | |
EntityBase:: |
public | function |
Gets a typed data object for this entity object. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Indicates if a link template exists for a given key. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Gets the identifier. Overrides EntityInterface:: |
11 |
EntityBase:: |
public | function |
Gets the label of the entity. Overrides EntityInterface:: |
6 |
EntityBase:: |
public | function |
Gets the language of the entity. Overrides EntityInterface:: |
1 |
EntityBase:: |
protected | function | Gets the language manager. | |
EntityBase:: |
protected | function | Gets an array link templates. | 1 |
EntityBase:: |
public static | function |
Loads an entity. Overrides EntityInterface:: |
|
EntityBase:: |
public static | function |
Loads one or more entities. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Acts on a created entity before hooks are invoked. Overrides EntityInterface:: |
4 |
EntityBase:: |
public static | function |
Acts on deleted entities before the delete hook is invoked. Overrides EntityInterface:: |
16 |
EntityBase:: |
public static | function |
Acts on loaded entities. Overrides EntityInterface:: |
2 |
EntityBase:: |
public static | function |
Changes the values of an entity before it is created. Overrides EntityInterface:: |
5 |
EntityBase:: |
public | function |
Gets a list of entities referenced by this entity. Overrides EntityInterface:: |
1 |
EntityBase:: |
public | function |
Generates the HTML for a link to this entity. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Gets a list of URI relationships supported by this entity. Overrides EntityInterface:: |
|
EntityBase:: |
protected | function | Gets an array of placeholders for this entity. | 2 |
EntityBase:: |
public | function |
Gets the entity UUID (Universally Unique Identifier). Overrides EntityInterface:: |
1 |
EntityBase:: |
protected | function | Gets the UUID generator. | |
InstallingTrait:: |
protected | function | Determines if this config entity is being installed from an extension. | |
InstallingTrait:: |
abstract public | function | Determines whether the entity is new. | |
LoggerTrait:: |
protected | property | The logging channel to use. | |
LoggerTrait:: |
public | function | Retrieves the logger. | |
LoggerTrait:: |
protected | function | Logs an exception. | |
LoggerTrait:: |
public | function | Sets the logger. | |
PluginDependencyTrait:: |
protected | function | Calculates and adds dependencies of a specific plugin instance. | 1 |
PluginDependencyTrait:: |
protected | function | Calculates and returns dependencies of a specific plugin instance. | |
PluginDependencyTrait:: |
protected | function | Wraps the module handler. | 1 |
PluginDependencyTrait:: |
protected | function | Wraps the theme handler. | 1 |
RefinableCacheableDependencyTrait:: |
public | function | 1 | |
RefinableCacheableDependencyTrait:: |
public | function | ||
RefinableCacheableDependencyTrait:: |
public | function | ||
RefinableCacheableDependencyTrait:: |
public | function | ||
Server:: |
protected | property | The ID of the backend plugin. | |
Server:: |
protected | property | The backend plugin instance. | |
Server:: |
protected | property | The backend plugin configuration. | |
Server:: |
protected | property | The displayed description of the server. | |
Server:: |
protected | property | The features this server supports. | |
Server:: |
protected | property | The ID of the server. | |
Server:: |
protected | property | The displayed name of the server. | |
Server:: |
public | function |
Adds a new index to this server. Overrides BackendSpecificInterface:: |
|
Server:: |
public | function |
Calculates dependencies and stores them in the dependency property. Overrides ConfigEntityBase:: |
|
Server:: |
public | function |
Deletes all the items from the index. Overrides BackendSpecificInterface:: |
|
Server:: |
public | function |
Deletes all items on this server, except those from read-only indexes. Overrides ServerInterface:: |
|
Server:: |
public | function |
Deletes the specified items from the index. Overrides BackendSpecificInterface:: |
|
Server:: |
public | function |
Retrieves the backend. Overrides ServerInterface:: |
|
Server:: |
public | function |
Retrieves the configuration of this server's backend plugin. Overrides ServerInterface:: |
|
Server:: |
public | function |
Provides information on additional fields made available by the backend. Overrides BackendSpecificInterface:: |
|
Server:: |
public | function |
Retrieves the plugin ID of the backend of this server. Overrides ServerInterface:: |
|
Server:: |
public | function |
Retrieves the server's description. Overrides ServerInterface:: |
|
Server:: |
public | function |
Limits the processors displayed in the UI for indexes on this server. Overrides BackendSpecificInterface:: |
|
Server:: |
public | function |
Retrieves a list of indexes which use this server. Overrides ServerInterface:: |
|
Server:: |
public | function |
Returns all features that this backend supports. Overrides BackendSpecificInterface:: |
|
Server:: |
public | function |
Determines whether the backend is valid. Overrides ServerInterface:: |
|
Server:: |
public | function |
Indexes the specified items. Overrides BackendSpecificInterface:: |
|
Server:: |
public | function |
Returns a boolean with the availability of the backend. Overrides BackendSpecificInterface:: |
|
Server:: |
public | function |
Informs the entity that entities it depends on will be deleted. Overrides ConfigEntityBase:: |
|
Server:: |
public | function |
Acts on a saved entity before the insert or update hook is invoked. Overrides EntityBase:: |
|
Server:: |
public static | function |
Acts on entities before they are deleted and before hooks are invoked. Overrides ConfigEntityBase:: |
|
Server:: |
public | function |
Acts on an entity before the presave hook is invoked. Overrides ConfigEntityBase:: |
|
Server:: |
public | function |
Removes an index from this server. Overrides BackendSpecificInterface:: |
|
Server:: |
public | function |
Executes a search on this server. Overrides BackendSpecificInterface:: |
|
Server:: |
public | function |
Sets the configuration of this server's backend plugin. Overrides ServerInterface:: |
|
Server:: |
public | function |
Determines whether the backend supports a given add-on data type. Overrides BackendSpecificInterface:: |
|
Server:: |
public | function |
Determines whether this server supports a given feature. Overrides ServerInterface:: |
|
Server:: |
public | function |
Notifies the server that an index attached to it has been changed. Overrides BackendSpecificInterface:: |
|
Server:: |
public | function |
Returns additional, backend-specific information about this server. Overrides BackendSpecificInterface:: |
|
Server:: |
public | function | Implements the magic __clone() method. | |
SynchronizableEntityTrait:: |
protected | property | Whether this entity is being created, updated or deleted through a synchronization process. | |
SynchronizableEntityTrait:: |
public | function | ||
SynchronizableEntityTrait:: |
public | function |