class Flow in CMS Content Sync 2.1.x
Same name in this branch
- 2.1.x src/Entity/Flow.php \Drupal\cms_content_sync\Entity\Flow
- 2.1.x modules/cms_content_sync_views/src/Plugin/views/filter/Flow.php \Drupal\cms_content_sync_views\Plugin\views\filter\Flow
Same name and namespace in other branches
- 8 src/Entity/Flow.php \Drupal\cms_content_sync\Entity\Flow
- 2.0.x src/Entity/Flow.php \Drupal\cms_content_sync\Entity\Flow
Defines the "Content Sync - Flow" entity.
Plugin annotation
@ConfigEntityType(
id = "cms_content_sync_flow",
label = @Translation("Content Sync - Flow"),
handlers = {
"list_builder" = "Drupal\cms_content_sync\Controller\FlowListBuilder",
"form" = {
"add" = "Drupal\cms_content_sync\Form\FlowForm",
"edit" = "Drupal\cms_content_sync\Form\FlowForm",
"delete" = "Drupal\cms_content_sync\Form\FlowDeleteForm",
"copy_remote" = "Drupal\cms_content_sync\Form\CopyRemoteFlow",
}
},
config_prefix = "flow",
admin_permission = "administer cms content sync",
entity_keys = {
"id" = "id",
"label" = "name",
},
config_export = {
"id",
"name",
"variant",
"type",
"simple_settings",
"per_bundle_settings",
"sync_entities",
},
links = {
"edit-form" = "/admin/config/services/cms_content_sync/flow/{cms_content_sync_flow}/edit",
"delete-form" = "/admin/config/services/cms_content_sync/flow/{cms_content_sync_flow}/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\Flow implements FlowInterface
- class \Drupal\Core\Config\Entity\ConfigEntityBase implements ConfigEntityInterface uses SynchronizableEntityTrait, PluginDependencyTrait
Expanded class hierarchy of Flow
43 files declare their use of Flow
- CliService.php in src/
Cli/ CliService.php - CliService.php in modules/
cms_content_sync_developer/ 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.
- ConfigSubscriber.php in src/
EventSubscriber/ ConfigSubscriber.php
4 string references to 'Flow'
- 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/ Flow.php, line 52
Namespace
Drupal\cms_content_sync\EntityView source
class Flow extends ConfigEntityBase implements FlowInterface {
/**
* @var string HANDLER_IGNORE
* Ignore this entity type / bundle / field completely
*/
public const HANDLER_IGNORE = 'ignore';
/**
* @var string PREVIEW_DISABLED
* Hide these entities completely
*/
public const PREVIEW_DISABLED = 'disabled';
/**
* @var string PREVIEW_TABLE
* Show these entities in a table view
*/
public const PREVIEW_TABLE = 'table';
/**
* This Flow pushes entities.
*/
public const TYPE_PUSH = 'push';
/**
* This Flow pulls entities.
*/
public const TYPE_PULL = 'pull';
/**
* This Flow pushes and pulls entities.
*
* @deprecated will be removed in v2
*/
public const TYPE_BOTH = 'both';
public const V2_STATUS_NONE = '';
public const V2_STATUS_EXPORTED = 'exported';
public const V2_STATUS_ACTIVE = 'active';
public const VARIANT_SIMPLE = 'simple';
public const VARIANT_PER_BUNDLE = 'per-bundle';
/**
* The variant. Simple is the new default, per-bundle is the old default for
* Flows created before v2.1.
* Simple offers only a handful of options and applies the same settings
* to all entity types whereas per-bundle mode allows for entity type based
* management of all configuration; so more complex but also more precise.
* Simple uses our new embed frontend, so has better UX whereas per-bundle
* uses clunky Drupal forms.
*
* @var string
*/
public $variant;
/**
* Either "push" or "pull".
*
* @var string
*/
public $type;
/**
* The Flow ID.
*
* @var string
*/
public $id;
/**
* The Flow name.
*
* @var string
*/
public $name;
/**
* The settings for variant Simple.
*
* @var array
*/
public $simple_settings;
/**
* The settings for variant per-bundle. Hierarchy is:
* [type machine name e.g. 'node']
* [bundle machine name e.g. 'page']
* ['settings']
* [...]
* ['properties']
* [property/field name e.g. 'title']
* [...]
*
* @var array
*/
public $per_bundle_settings;
/**
* Old way to store settings. This is automatically migrated to be stored in
* the new `$per_bundle_settings` property instead by
* `cms_content_sync_update_8021`.
*
* @var array
*
* @deprecated
*/
public $sync_entities;
/**
* @var Flow[]
* All content synchronization configs. Use {@see Flow::getAll}
* to request them.
*/
public static $all = null;
/**
* Ensure that pools are pulled before the flows.
*/
public function calculateDependencies() {
parent::calculateDependencies();
foreach ($this
->getController()
->getUsedPools() as $pool) {
$this
->addDependency('config', 'cms_content_sync.pool.' . $pool->id);
}
}
/**
* @var IFlowController
*/
protected $handler;
/**
* Provide the controller to act upon the stored configuration.
*
* @return IFlowController
*/
public function getController() {
if (!$this->handler) {
if ($this->variant === Flow::VARIANT_PER_BUNDLE) {
$this->handler = new FlowControllerPerBundle($this);
}
else {
$this->handler = new FlowControllerSimple($this);
}
}
return $this->handler;
}
/**
* Get all flows pushing this entity.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* @param $action
* @param bool $include_dependencies
*
* @throws \Exception
*
* @return array|Flow[]
*/
public static function getFlowsForPushing($entity, $action, $include_dependencies = true) {
if (SyncIntent::ACTION_DELETE === $action) {
$last_push = EntityStatus::getLastPushForEntity($entity);
if (empty($last_push)) {
return [];
}
}
$flows = PushIntent::getFlowsForEntity($entity, PushIntent::PUSH_AUTOMATICALLY, $action);
if (!count($flows) && SyncIntent::ACTION_DELETE === $action) {
$flows = PushIntent::getFlowsForEntity($entity, PushIntent::PUSH_MANUALLY, $action);
}
if ($include_dependencies && !count($flows)) {
$flows = PushIntent::getFlowsForEntity($entity, PushIntent::PUSH_AS_DEPENDENCY, $action);
if (count($flows)) {
$infos = EntityStatus::getInfosForEntity($entity
->getEntityTypeId(), $entity
->uuid());
$pushed = [];
foreach ($infos as $info) {
if (!in_array($info
->getFlow(), $flows)) {
continue;
}
if (in_array($info
->getFlow(), $pushed)) {
continue;
}
if (!$info
->getLastPush()) {
continue;
}
$pushed[] = $info
->getFlow();
}
$flows = $pushed;
}
}
return $flows;
}
/**
* Get a unique version hash for the configuration of the provided entity type
* and bundle.
*
* @param string $type_name
* The entity type in question
* @param string $bundle_name
* The bundle in question
*
* @return string
* A 32 character MD5 hash of all important configuration for this entity
* type and bundle, representing it's current state and allowing potential
* conflicts from entity type updates to be handled smoothly
*/
public static function getEntityTypeVersion($type_name, $bundle_name) {
// @todo Include export_config keys in version definition for config entity types like webforms.
if (EntityHandlerPluginManager::isEntityTypeFieldable($type_name)) {
$entityFieldManager = \Drupal::service('entity_field.manager');
$field_definitions = $entityFieldManager
->getFieldDefinitions($type_name, $bundle_name);
$field_definitions_array = (array) $field_definitions;
unset($field_definitions_array['field_cms_content_synced']);
$field_names = array_keys($field_definitions_array);
sort($field_names);
$version = json_encode($field_names);
}
else {
$version = '';
}
return md5($version);
}
/**
* Check whether the local deletion of the given entity is allowed.
*
* @return bool
*/
public static function isLocalDeletionAllowed(EntityInterface $entity) {
if (!$entity
->uuid()) {
return true;
}
$entity_status = EntityStatus::getInfosForEntity($entity
->getEntityTypeId(), $entity
->uuid());
foreach ($entity_status as $info) {
if (!$info
->getLastPull() || $info
->isSourceEntity()) {
continue;
}
$flow = $info
->getFlow();
if (!$flow) {
continue;
}
$config = $flow
->getController()
->getEntityTypeConfig($entity
->getEntityTypeId(), $entity
->bundle(), true);
if (PullIntent::PULL_DISABLED === $config['import']) {
continue;
}
if (!boolval($config['import_deletion_settings']['allow_local_deletion_of_import'])) {
return false;
}
}
return true;
}
/**
* Load all entities.
*
* Load all cms_content_sync_flow entities and add overrides from global $config.
*
* @param bool $skip_inactive
* Do not return inactive flows by default
*
* @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*
* @return Flow[]
*/
public static function getAll($skip_inactive = true, $rebuild = false) {
if ($skip_inactive && null !== self::$all && !$rebuild) {
return self::$all;
}
/**
* @var Flow[] $configurations
*/
$configurations = \Drupal::entityTypeManager()
->getStorage('cms_content_sync_flow')
->loadMultiple();
foreach ($configurations as $id => &$configuration) {
global $config;
$config_name = 'cms_content_sync.flow.' . $id;
if (!isset($config[$config_name]) || empty($config[$config_name])) {
continue;
}
foreach ($config[$config_name] as $key => $new_value) {
if (in_array($key, [
'per_bundle_settings',
'simple_settings',
])) {
$configuration->{$key} = array_merge_recursive($configuration->{$key}, $new_value);
continue;
}
$configuration
->set($key, $new_value);
}
// Calculate 'version' property if missing.
$configuration
->getController()
->getEntityTypeConfig();
}
if ($skip_inactive) {
$result = [];
foreach ($configurations as $id => $flow) {
if ($flow
->get('status')) {
$result[$id] = $flow;
}
}
$configurations = $result;
self::$all = $configurations;
}
return $configurations;
}
public static function resetFlowCache() {
self::$all = null;
}
/**
* Get the first synchronization that allows the pull of the provided entity
* type.
*
* @param Pool $pool
* @param string $entity_type_name
* @param string $bundle_name
* @param string $reason
* @param string $action
* @param bool $strict
*
* @return null|Flow
*/
public static function getFlowForPoolAndEntityType($pool, $entity_type_name, $bundle_name, $reason, $action = SyncIntent::ACTION_CREATE, $strict = false) {
$flows = self::getAll();
// If $reason is DEPENDENCY and there's a Flow pulling AUTOMATICALLY we take that. But only if there's no Flow
// explicitly handling this entity AS_DEPENDENCY.
$fallback = null;
foreach ($flows as $flow) {
if ($pool && !in_array($pool, $flow
->getController()
->getUsedPoolsForPulling($entity_type_name, $bundle_name))) {
continue;
}
if (!$flow
->getController()
->canPullEntity($entity_type_name, $bundle_name, $reason, $action, true)) {
if (!$strict && $flow
->getController()
->canPullEntity($entity_type_name, $bundle_name, $reason, $action, false)) {
$fallback = $flow;
}
continue;
}
return $flow;
}
if (!empty($fallback)) {
return $fallback;
}
return null;
}
/**
* Unset the flow version warning.
*/
public function resetVersionWarning() {
$moduleHandler = \Drupal::service('module_handler');
if ($moduleHandler
->moduleExists('cms_content_sync_developer')) {
$developer_config = \Drupal::service('config.factory')
->getEditable('cms_content_sync.developer');
$mismatching_versions = $developer_config
->get('version_mismatch');
if (!empty($mismatching_versions)) {
unset($mismatching_versions[$this
->id()]);
$developer_config
->set('version_mismatch', $mismatching_versions)
->save();
}
}
}
/**
* @param $type
* @param $bundle
* @param IFlowController|null $existing
* @param null $field
*
* @return array
*/
public static function getDefaultFieldConfigForEntityType($type, $bundle, $existing = null, $field = null) {
if ($field) {
$field_default_values = [
'export' => null,
'import' => null,
];
$entity_type = \Drupal::entityTypeManager()
->getDefinition($type);
// @todo Should be gotten from the Entity Type Handler instead.
$forbidden_fields = [
// These are not relevant or misleading when synchronized.
'revision_default',
'revision_translation_affected',
'content_translation_outdated',
// Field collections.
'host_type',
// Files.
'uri',
'filemime',
'filesize',
// Media.
'thumbnail',
// Taxonomy.
'parent',
// These are standard fields defined by the Flow
// Entity type that entities may not override (otherwise
// these fields will collide with CMS Content Sync functionality)
$entity_type
->getKey('bundle'),
$entity_type
->getKey('id'),
$entity_type
->getKey('uuid'),
$entity_type
->getKey('label'),
$entity_type
->getKey('revision'),
];
$pools = Pool::getAll();
if (count($pools)) {
$reserved = reset($pools)
->getClient()
->getReservedPropertyNames();
$forbidden_fields = array_merge($forbidden_fields, $reserved);
}
if (false !== in_array($field, $forbidden_fields)) {
$field_default_values['handler'] = 'ignore';
$field_default_values['export'] = PushIntent::PUSH_DISABLED;
$field_default_values['import'] = PullIntent::PULL_DISABLED;
return $field_default_values;
}
$field_handler_service = \Drupal::service('plugin.manager.cms_content_sync_field_handler');
$field_definition = \Drupal::service('entity_field.manager')
->getFieldDefinitions($type, $bundle)[$field];
$field_handlers = $field_handler_service
->getHandlerOptions($type, $bundle, $field, $field_definition, true);
if (empty($field_handlers)) {
throw new \Exception('Unsupported field type ' . $field_definition
->getType() . ' for field ' . $type . '.' . $bundle . '.' . $field);
}
reset($field_handlers);
$handler_id = empty($field_default_values['handler']) ? key($field_handlers) : $field_default_values['handler'];
$field_default_values['handler'] = $handler_id;
$field_default_values['export'] = PushIntent::PUSH_AUTOMATICALLY;
$field_default_values['import'] = PullIntent::PULL_AUTOMATICALLY;
$handler = $field_handler_service
->createInstance($handler_id, [
'entity_type_name' => $type,
'bundle_name' => $bundle,
'field_name' => $field,
'field_definition' => $field_definition,
'settings' => $field_default_values,
'sync' => null,
]);
$advanced_settings = $handler
->getHandlerSettings($field_default_values);
if (count($advanced_settings)) {
foreach ($advanced_settings as $name => $element) {
$field_default_values['handler_settings'][$name] = $element['#default_value'];
}
}
return $field_default_values;
}
$entityTypeManager = \Drupal::service('entity_type.manager');
$type = $entityTypeManager
->getDefinition($type, false);
$field_definition = $type ? \Drupal::service('entity_field.manager')
->getFieldDefinitions($type, $bundle) : false;
$result = [];
if ($field_definition) {
foreach ($field_definition as $key => $field) {
$field_config = $existing ? $existing
->getPropertyConfig($type, $bundle, $key) : NULL;
$result[$key] = $field_config ? $field_config : self::getDefaultFieldConfigForEntityType($type, $bundle, null, $key);
}
}
return $result;
}
public function useV2() {
return self::V2_STATUS_ACTIVE === $this
->getV2Status() || Migration::useV2();
}
public function v2Ready() {
$status = $this
->getV2Status();
return self::V2_STATUS_NONE != $status;
}
public function getV2Status() {
return Migration::getFlowStatus($this);
}
}
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 | ||
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 |
Overrides Entity::isNew(). Overrides EntityBase:: |
|
ConfigEntityBase:: |
public | function |
Returns whether this entity is being changed during the uninstall process. Overrides ConfigEntityInterface:: |
|
ConfigEntityBase:: |
public | function |
Informs the entity that entities it depends on will be deleted. Overrides ConfigEntityInterface:: |
8 |
ConfigEntityBase:: |
public static | function |
Acts on entities before they are deleted and before hooks are invoked. Overrides EntityBase:: |
8 |
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 |
Constructs an Entity object. Overrides EntityBase:: |
10 |
ConfigEntityBase:: |
public | function |
Overrides EntityBase:: |
4 |
DependencySerializationTrait:: |
protected | property | ||
DependencySerializationTrait:: |
protected | property | ||
DependencySerializationTrait:: |
public | function | Aliased as: traitSleep | 2 |
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 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:: |
18 |
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:: |
7 |
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. | |
Flow:: |
public static | property | All content synchronization configs. Use { to request them. | |
Flow:: |
protected | property | ||
Flow:: |
public | property | The Flow ID. | |
Flow:: |
public | property | The Flow name. | |
Flow:: |
public | property | The settings for variant per-bundle. Hierarchy is: [type machine name e.g. 'node'] [bundle machine name e.g. 'page'] ['settings'] [...] ['properties'] [property/field name e.g. 'title'] [...] | |
Flow:: |
public | property | The settings for variant Simple. | |
Flow:: |
public | property | Old way to store settings. This is automatically migrated to be stored in the new `$per_bundle_settings` property instead by `cms_content_sync_update_8021`. | |
Flow:: |
public | property | Either "push" or "pull". | |
Flow:: |
public | property | The variant. Simple is the new default, per-bundle is the old default for Flows created before v2.1. Simple offers only a handful of options and applies the same settings to all entity types whereas per-bundle mode allows for entity type… | |
Flow:: |
public | function |
Ensure that pools are pulled before the flows. Overrides ConfigEntityBase:: |
|
Flow:: |
public static | function | Load all entities. | |
Flow:: |
public | function | Provide the controller to act upon the stored configuration. | |
Flow:: |
public static | function | ||
Flow:: |
public static | function | Get a unique version hash for the configuration of the provided entity type and bundle. | |
Flow:: |
public static | function | Get the first synchronization that allows the pull of the provided entity type. | |
Flow:: |
public static | function | Get all flows pushing this entity. | |
Flow:: |
public | function | ||
Flow:: |
public | constant | Ignore this entity type / bundle / field completely | |
Flow:: |
public static | function | Check whether the local deletion of the given entity is allowed. | |
Flow:: |
public | constant | Hide these entities completely | |
Flow:: |
public | constant | Show these entities in a table view | |
Flow:: |
public static | function | ||
Flow:: |
public | function | Unset the flow version warning. | |
Flow:: |
public | constant | This Flow pushes and pulls entities. | |
Flow:: |
public | constant | This Flow pulls entities. | |
Flow:: |
public | constant | This Flow pushes entities. | |
Flow:: |
public | function | ||
Flow:: |
public | function | ||
Flow:: |
public | constant | ||
Flow:: |
public | constant | ||
Flow:: |
public | constant | ||
Flow:: |
public | constant | ||
Flow:: |
public | constant | ||
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 | ||
SynchronizableEntityTrait:: |
protected | property | Whether this entity is being created, updated or deleted through a synchronization process. | |
SynchronizableEntityTrait:: |
public | function | ||
SynchronizableEntityTrait:: |
public | function |