class Pool in CMS Content Sync 8
Same name in this branch
- 8 src/Entity/Pool.php \Drupal\cms_content_sync\Entity\Pool
- 8 modules/cms_content_sync_views/src/Plugin/views/filter/Pool.php \Drupal\cms_content_sync_views\Plugin\views\filter\Pool
Same name and namespace in other branches
- 2.1.x src/Entity/Pool.php \Drupal\cms_content_sync\Entity\Pool
- 2.0.x src/Entity/Pool.php \Drupal\cms_content_sync\Entity\Pool
Defines the "Content Sync - Pool" entity.
Plugin annotation
@ConfigEntityType(
id = "cms_content_sync_pool",
label = @Translation("Content Sync - Pool"),
handlers = {
"list_builder" = "Drupal\cms_content_sync\Controller\PoolListBuilder",
"form" = {
"add" = "Drupal\cms_content_sync\Form\PoolForm",
"edit" = "Drupal\cms_content_sync\Form\PoolForm",
"delete" = "Drupal\cms_content_sync\Form\PoolDeleteForm",
}
},
config_prefix = "pool",
admin_permission = "administer cms content sync",
entity_keys = {
"id" = "id",
"label" = "label",
},
config_export = {
"id",
"label",
"backend_url",
},
links = {
"edit-form" = "/admin/config/services/cms_content_sync/pool/{cms_content_sync_pool}/edit",
"delete-form" = "/admin/config/services/cms_content_sync/synchronizations/{cms_content_sync_pool}/delete",
}
)
Hierarchy
- class \Drupal\Core\Entity\EntityBase implements EntityInterface uses RefinableCacheableDependencyTrait, DependencySerializationTrait
- class \Drupal\Core\Config\Entity\ConfigEntityBase implements ConfigEntityInterface uses SynchronizableEntityTrait, PluginDependencyTrait
- class \Drupal\cms_content_sync\Entity\Pool implements PoolInterface
- class \Drupal\Core\Config\Entity\ConfigEntityBase implements ConfigEntityInterface uses SynchronizableEntityTrait, PluginDependencyTrait
Expanded class hierarchy of Pool
24 files declare their use of Pool
- CliService.php in src/
Cli/ CliService.php - cms_content_sync.install in ./
cms_content_sync.install - Install file for cms_content_sync.
- cms_content_sync.module in ./
cms_content_sync.module - Module file for cms_content_sync.
- ContentSyncSettings.php in src/
Controller/ ContentSyncSettings.php - CopyRemoteFlow.php in src/
Form/ CopyRemoteFlow.php
4 string references to 'Pool'
- cms_content_sync_views_data_alter in modules/
cms_content_sync_views/ cms_content_sync_views.module - Implements hook_views_data_alter().
- DebugForm::inspectEntity in src/
Form/ DebugForm.php - Display debug output for a given entity to analyze it's sync structure.
- PoolAssignmentForm::buildForm in src/
Form/ PoolAssignmentForm.php - Form constructor.
- views.view.content_sync_entity_status.yml in modules/
cms_content_sync_health/ config/ install/ views.view.content_sync_entity_status.yml - modules/cms_content_sync_health/config/install/views.view.content_sync_entity_status.yml
File
- src/
Entity/ Pool.php, line 46
Namespace
Drupal\cms_content_sync\EntityView source
class Pool extends ConfigEntityBase implements PoolInterface {
/**
* @var string POOL_USAGE_FORBID Forbid usage of this pool for this flow
*/
public const POOL_USAGE_FORBID = 'forbid';
/**
* @var string POOL_USAGE_ALLOW Allow usage of this pool for this flow
*/
public const POOL_USAGE_ALLOW = 'allow';
/**
* @var string POOL_USAGE_FORCE Force usage of this pool for this flow
*/
public const POOL_USAGE_FORCE = 'force';
/**
* The Pool ID.
*
* @var string
*/
public $id;
/**
* The Pool label.
*
* @var string
*/
public $label;
/**
* The Pool Sync Core backend URL.
*
* @var string
*/
public $backend_url;
/**
* The authentication type to use.
* See Pool::AUTHENTICATION_TYPE_* for details.
*
* @deprecated Will be removed with the 2.0 release.
*
* @var string
*/
public $authentication_type;
/**
* The unique site identifier.
*
* @deprecated Will be removed with the 2.0 release.
*
* @var string
*/
public $site_id;
/**
* @var \EdgeBox\SyncCore\V1\SyncCore
*/
protected $client;
/**
* @return \EdgeBox\SyncCore\Interfaces\ISyncCore
*/
public function getClient() {
if (!$this->client) {
$this->client = SyncCoreFactory::getSyncCore($this
->getSyncCoreUrl());
}
return $this->client;
}
/**
* {@inheritdoc}
*/
public static function preDelete(EntityStorageInterface $storage, array $entities) {
parent::preDelete($storage, $entities);
try {
foreach ($entities as $entity) {
$handler = new SyncCorePoolExport($entity);
// $handler->remove(FALSE);
}
} catch (RequestException $e) {
$messenger = \Drupal::messenger();
$messenger
->addError(t('The Sync Core server could not be accessed. Please check the connection.'));
throw new AccessDeniedHttpException();
}
}
/**
* Get a list of all sites from all pools that use a different version ID and
* provide a diff on field basis.
*
* @param string $entity_type
* @param string $bundle
*
* @throws \Exception
*
* @return array pool => site_id[]
*/
public static function getAllSitesWithDifferentEntityTypeVersion($entity_type, $bundle) {
$result = [];
foreach (Pool::getAll() as $pool_id => $pool) {
$diff = $pool
->getClient()
->getSitesWithDifferentEntityTypeVersion($pool->id, $entity_type, $bundle, Flow::getEntityTypeVersion($entity_type, $bundle));
if (empty($diff)) {
continue;
}
$result[$pool_id] = $diff;
}
return $result;
}
/**
* Get a list of all sites for all pools that are using this entity.
* Only works for pools that are connected to the entity on this site.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
*
* @throws \Exception
* @throws \GuzzleHttp\Exception\GuzzleException
*
* @return array pool => site_id[]
*/
public static function getAllExternalUsages($entity) {
$entity_type = $entity
->getEntityTypeId();
$bundle = $entity
->bundle();
$entity_uuid = $entity
->uuid();
$result = [];
foreach (EntityStatus::getInfosForEntity($entity_type, $entity_uuid) as $status) {
$pool = $status
->getPool();
if (empty($pool)) {
continue;
}
$pool_id = $pool->id;
if (isset($result[$pool_id])) {
continue;
}
if ($entity instanceof ConfigEntityInterface) {
$shared_entity_id = $entity
->id();
}
else {
$shared_entity_id = $entity_uuid;
}
$result[$pool_id] = $pool
->getClient()
->getSyndicationService()
->getExternalUsages($pool_id, $entity_type, $bundle, $shared_entity_id);
}
return $result;
}
/**
* Returns the Sync Core URL for this pool.
*
* @return string
*/
public function getSyncCoreUrl() {
// Check if the BackendUrl got overwritten.
$cms_content_sync_settings = Settings::get('cms_content_sync');
if (isset($cms_content_sync_settings, $cms_content_sync_settings['pools'][$this->id]['backend_url'])) {
return $cms_content_sync_settings['pools'][$this->id]['backend_url'];
}
return $this->backend_url;
}
/**
* Get the newest pull/push timestamp for this pool from all status
* entities that exist for the given entity.
*
* @param $entity_type
* @param $entity_uuid
* @param bool $pull
*
* @return null|int
*/
public function getNewestTimestamp($entity_type, $entity_uuid, $pull = true) {
$entity_status = EntityStatus::getInfoForPool($entity_type, $entity_uuid, $this);
$timestamp = null;
foreach ($entity_status as $info) {
$item_timestamp = $pull ? $info
->getLastPull() : $info
->getLastPush();
if ($item_timestamp) {
if (!$timestamp || $timestamp < $item_timestamp) {
$timestamp = $item_timestamp;
}
}
}
return $timestamp;
}
/**
* Get the newest pull/push timestamp for this pool from all status
* entities that exist for the given entity.
*
* @param $entity_type
* @param $entity_uuid
* @param int $timestamp
* @param bool $pull
*/
public function setTimestamp($entity_type, $entity_uuid, $timestamp, $pull = true) {
$entity_status = EntityStatus::getInfoForPool($entity_type, $entity_uuid, $this);
foreach ($entity_status as $info) {
if ($pull) {
$info
->setLastPull($timestamp);
}
else {
$info
->setLastPush($timestamp);
}
$info
->save();
}
}
/**
* Mark the entity as deleted in this pool (reflected on all entity status
* entities related to this pool).
*
* @param $entity_type
* @param $entity_uuid
*/
public function markDeleted($entity_type, $entity_uuid) {
$entity_status = EntityStatus::getInfoForPool($entity_type, $entity_uuid, $this);
foreach ($entity_status as $info) {
$info
->isDeleted(true);
$info
->save();
}
}
/**
* Check whether this entity has been deleted intentionally already. In this
* case we ignore push and pull intents for it.
*
* @param $entity_type
* @param $entity_uuid
*
* @return bool
*/
public function isEntityDeleted($entity_type, $entity_uuid) {
$entity_status = EntityStatus::getInfoForPool($entity_type, $entity_uuid, $this);
foreach ($entity_status as $info) {
if ($info
->isDeleted()) {
return true;
}
}
return false;
}
/**
* Load all cms_content_sync_pool entities.
*
* @return Pool[]
*/
public static function getAll() {
/**
* @var Pool[] $configurations
*/
return \Drupal::entityTypeManager()
->getStorage('cms_content_sync_pool')
->loadMultiple();
}
/**
* Returns an list of pools that can be selected for an entity type.
*
* @oaram string $entity_type
* The entity type the pools should be returned for.
*
* @param string $bundle
* The bundle the pools should be returned for
* @param \Drupal\Core\Entity\EntityInterface $parent_entity
* The
* parent entity, if any. Only required if $field_name is given-.
* @param string $field_name
* The name of the parent entity field that
* references this entity. In this case if the field handler is set to
* "automatically push referenced entities", the user doesn't have to
* make a choice as it is set automatically anyway.
* @param mixed $entity_type
*
* @return array $selectable_pools
*/
public static function getSelectablePools($entity_type, $bundle, $parent_entity = null, $field_name = null) {
// Get all available flows.
$flows = Flow::getAll();
$configs = [];
$selectable_pools = [];
$selectable_flows = [];
// When editing the entity directly, the "push as reference" flows won't be available and vice versa.
$root_entity = !$parent_entity && !$field_name;
if ($root_entity) {
$allowed_push_options = [
PushIntent::PUSH_FORCED,
PushIntent::PUSH_MANUALLY,
PushIntent::PUSH_AUTOMATICALLY,
];
}
else {
$allowed_push_options = [
PushIntent::PUSH_FORCED,
PushIntent::PUSH_AS_DEPENDENCY,
];
}
foreach ($flows as $flow_id => $flow) {
$flow_entity_config = $flow
->getEntityTypeConfig($entity_type, $bundle);
if (empty($flow_entity_config)) {
continue;
}
if ('ignore' == $flow_entity_config['handler']) {
continue;
}
if (!in_array($flow_entity_config['export'], $allowed_push_options)) {
continue;
}
if ($parent_entity && $field_name) {
$parent_flow_config = $flow->sync_entities[$parent_entity
->getEntityTypeId() . '-' . $parent_entity
->bundle() . '-' . $field_name];
if (!empty($parent_flow_config['handler_settings']['export_referenced_entities'])) {
continue;
}
}
$selectable_flows[$flow_id] = $flow;
$configs[$flow_id] = [
'flow_label' => $flow
->label(),
'flow' => $flow
->getEntityTypeConfig($entity_type, $bundle),
];
}
foreach ($configs as $config_id => $config) {
if (in_array('allow', $config['flow']['export_pools'])) {
$selectable_pools[$config_id]['flow_label'] = $config['flow_label'];
$selectable_pools[$config_id]['widget_type'] = $config['flow']['pool_export_widget_type'];
foreach ($config['flow']['export_pools'] as $pool_id => $push_to_pool) {
// Filter out all pools with configuration "allow".
if (self::POOL_USAGE_ALLOW == $push_to_pool) {
$pool_entity = \Drupal::entityTypeManager()
->getStorage('cms_content_sync_pool')
->loadByProperties([
'id' => $pool_id,
]);
$pool_entity = reset($pool_entity);
$selectable_pools[$config_id]['pools'][$pool_id] = $pool_entity
->label();
}
}
}
}
return $selectable_pools;
}
/**
* Reset the status entities for this pool.
*
* @param string $pool_id
* The pool the status entities should be reset for
*/
public static function resetStatusEntities($pool_id = '') {
// Reset the entity status.
$status_storage = \Drupal::entityTypeManager()
->getStorage('cms_content_sync_entity_status');
$connection = \Drupal::database();
// For a single pool.
if (!empty($pool_id)) {
// Save flags to status entities that they have been reset.
$connection
->query('UPDATE cms_content_sync_entity_status SET flags=flags|:flag WHERE last_export IS NOT NULL AND pool=:pool', [
':flag' => EntityStatus::FLAG_LAST_PUSH_RESET,
':pool' => $pool_id,
]);
$connection
->query('UPDATE cms_content_sync_entity_status SET flags=flags|:flag WHERE last_import IS NOT NULL AND pool=:pool', [
':flag' => EntityStatus::FLAG_LAST_PULL_RESET,
':pool' => $pool_id,
]);
// Actual reset.
$db_query = $connection
->update($status_storage
->getBaseTable());
$db_query
->fields([
'last_export' => null,
'last_import' => null,
]);
$db_query
->condition('pool', $pool_id);
$db_query
->execute();
}
else {
// Save flags to status entities that they have been reset.
$connection
->query('UPDATE cms_content_sync_entity_status SET flags=flags|:flag WHERE last_export IS NOT NULL', [
':flag' => EntityStatus::FLAG_LAST_PUSH_RESET,
]);
$connection
->query('UPDATE cms_content_sync_entity_status SET flags=flags|:flag WHERE last_import IS NOT NULL', [
':flag' => EntityStatus::FLAG_LAST_PULL_RESET,
]);
// Actual reset.
$db_query = $connection
->update($status_storage
->getBaseTable());
$db_query
->fields([
'last_export' => null,
'last_import' => null,
]);
$db_query
->execute();
}
// Invalidate cache by storage.
$status_storage
->resetCache();
// Above cache clearing doesn't work reliably. So we reset the whole entity cache.
\Drupal::service('cache.entity')
->deleteAll();
}
/**
* Create a pool configuration programmatically.
*
* @param $pool_name
* @param string $pool_id
* @param $backend_url
* @param $authentication_type
*/
public static function createPool($pool_name, $pool_id, $backend_url, $authentication_type) {
// If no pool_id is given, create one.
if (empty($pool_id)) {
$pool_id = strtolower($pool_name);
$pool_id = preg_replace('@[^a-z0-9_]+@', '_', $pool_id);
}
$pools = Pool::getAll();
if (array_key_exists($pool_id, $pools)) {
\Drupal::messenger()
->addMessage('A pool with the machine name ' . $pool_id . ' does already exist. Therefor the creation has been skipped.', 'warning');
}
else {
$uuid_service = \Drupal::service('uuid');
$language_manager = \Drupal::service('language_manager');
$default_language = $language_manager
->getDefaultLanguage();
$pool_config = \Drupal::service('config.factory')
->getEditable('cms_content_sync.pool.' . $pool_id);
$pool_config
->set('uuid', $uuid_service
->generate())
->set('langcode', $default_language
->getId())
->set('status', true)
->set('id', $pool_id)
->set('label', $pool_name)
->set('backend_url', $backend_url)
->set('authentication_type', $authentication_type)
->save();
}
return $pool_id;
}
}
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 |
Calculates dependencies and stores them in the dependency property. Overrides ConfigEntityInterface:: |
13 |
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 |
Overrides Entity::isNew(). Overrides EntityBase:: |
|
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 |
Informs the entity that entities it depends on will be deleted. Overrides ConfigEntityInterface:: |
7 |
ConfigEntityBase:: |
public | function |
Acts on an entity before the presave hook is invoked. Overrides EntityBase:: |
13 |
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 | function |
Acts on a saved entity before the insert or update hook is invoked. Overrides EntityInterface:: |
14 |
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. | |
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 |
Pool:: |
public | property | The authentication type to use. See Pool::AUTHENTICATION_TYPE_* for details. | |
Pool:: |
public | property | The Pool Sync Core backend URL. | |
Pool:: |
protected | property | ||
Pool:: |
public | property | The Pool ID. | |
Pool:: |
public | property | The Pool label. | |
Pool:: |
public | property | The unique site identifier. | |
Pool:: |
public static | function | Create a pool configuration programmatically. | |
Pool:: |
public static | function | Load all cms_content_sync_pool entities. | |
Pool:: |
public static | function | Get a list of all sites for all pools that are using this entity. Only works for pools that are connected to the entity on this site. | |
Pool:: |
public static | function | Get a list of all sites from all pools that use a different version ID and provide a diff on field basis. | |
Pool:: |
public | function | ||
Pool:: |
public | function | Get the newest pull/push timestamp for this pool from all status entities that exist for the given entity. | |
Pool:: |
public static | function | Returns an list of pools that can be selected for an entity type. | |
Pool:: |
public | function | Returns the Sync Core URL for this pool. | |
Pool:: |
public | function | Check whether this entity has been deleted intentionally already. In this case we ignore push and pull intents for it. | |
Pool:: |
public | function | Mark the entity as deleted in this pool (reflected on all entity status entities related to this pool). | |
Pool:: |
public | constant | ||
Pool:: |
public | constant | ||
Pool:: |
public | constant | ||
Pool:: |
public static | function |
Acts on entities before they are deleted and before hooks are invoked. Overrides ConfigEntityBase:: |
|
Pool:: |
public static | function | Reset the status entities for this pool. | |
Pool:: |
public | function | Get the newest pull/push timestamp for this pool from all status entities that exist for the given entity. | |
RefinableCacheableDependencyTrait:: |
public | function | 1 | |
RefinableCacheableDependencyTrait:: |
public | function | ||
RefinableCacheableDependencyTrait:: |
public | function | ||
RefinableCacheableDependencyTrait:: |
public | function | ||
SynchronizableEntityTrait:: |
protected | property | Whether this entity is being created, updated or deleted through a synchronization process. | |
SynchronizableEntityTrait:: |
public | function | ||
SynchronizableEntityTrait:: |
public | function |