class Workflow in Workflow 8
Same name in this branch
- 8 src/Entity/Workflow.php \Drupal\workflow\Entity\Workflow
- 8 src/Feeds/Target/Workflow.php \Drupal\workflow\Feeds\Target\Workflow
Workflow configuration entity to persistently store configuration.
Plugin annotation
@ConfigEntityType(
id = "workflow_type",
label = @Translation("Workflow type"),
label_singular = @Translation("Workflow type"),
label_plural = @Translation("Workflow types"),
label_count = @PluralTranslation(
singular = "@count Workflow type",
plural = "@count Workflow types",
),
module = "workflow",
static_cache = TRUE,
translatable = TRUE,
handlers = {
"storage" = "Drupal\workflow\Entity\WorkflowStorage",
"list_builder" = "Drupal\workflow\WorkflowListBuilder",
"form" = {
"add" = "Drupal\workflow\Form\WorkflowTypeForm",
"delete" = "Drupal\Core\Entity\EntityDeleteForm",
"edit" = "Drupal\workflow\Form\WorkflowTypeForm",
}
},
admin_permission = "administer workflow",
config_prefix = "workflow",
bundle_of = "workflow_transition",
entity_keys = {
"id" = "id",
"label" = "label",
},
config_export = {
"id",
"label",
"module",
"status",
"options",
},
links = {
"canonical" = "/admin/config/workflow/workflow/{workflow_type}",
"collection" = "/admin/config/workflow/workflow",
"delete-form" = "/admin/config/workflow/workflow/{workflow_type}/delete",
"edit-form" = "/admin/config/workflow/workflow/{workflow_type}",
},
)
Hierarchy
- class \Drupal\Core\Entity\EntityBase implements EntityInterface uses RefinableCacheableDependencyTrait, DependencySerializationTrait
- class \Drupal\Core\Config\Entity\ConfigEntityBase implements ConfigEntityInterface uses SynchronizableEntityTrait, PluginDependencyTrait
- class \Drupal\workflow\Entity\Workflow implements WorkflowInterface uses MessengerTrait, StringTranslationTrait, WorkflowURLRouteParametersTrait
- class \Drupal\Core\Config\Entity\ConfigEntityBase implements ConfigEntityInterface uses SynchronizableEntityTrait, PluginDependencyTrait
Expanded class hierarchy of Workflow
7 files declare their use of Workflow
- workflow.module in ./
workflow.module - Support workflows made up of arbitrary states.
- WorkflowDefaultWidget.php in src/
Plugin/ Field/ FieldWidget/ WorkflowDefaultWidget.php - WorkflowItem.php in src/
Plugin/ Field/ FieldType/ WorkflowItem.php - WorkflowPermissions.php in src/
WorkflowPermissions.php - WorkflowStateActionBase.php in src/
Plugin/ Action/ WorkflowStateActionBase.php
13 string references to 'Workflow'
- workflow.info.yml in ./
workflow.info.yml - workflow.info.yml
- workflow.links.menu.yml in ./
workflow.links.menu.yml - workflow.links.menu.yml
- workflow.schema.yml in config/
schema/ workflow.schema.yml - config/schema/workflow.schema.yml
- workflowfield.info.yml in modules/
workflow_field/ workflowfield.info.yml - modules/workflow_field/workflowfield.info.yml
- WorkflowLocalTask::getDerivativeDefinitions in src/
Plugin/ Derivative/ WorkflowLocalTask.php - Gets the definition of all derivatives of a base plugin.
File
- src/
Entity/ Workflow.php, line 59
Namespace
Drupal\workflow\EntityView source
class Workflow extends ConfigEntityBase implements WorkflowInterface {
/*
* Provide URL route parameters for entity links.
*/
use MessengerTrait;
use StringTranslationTrait;
use WorkflowURLRouteParametersTrait;
/**
* The machine name.
*
* @var string
*/
public $id;
/**
* The human readable name.
*
* @var string
*/
public $label;
/**
* The Workflow settings (which would be a better name).
*
* @var array
*/
public $options = [];
/**
* The workflow-specific creation state.
*
* @var \Drupal\workflow\Entity\WorkflowState
*/
private $creation_state = NULL;
/**
* The workflow-specific creation state ID.
*
* @var string
*/
private $creation_sid = 0;
/**
* Attached States.
*
* @var \Drupal\workflow\Entity\WorkflowState[]
*/
public $states = [];
/**
* Attached Transitions.
*
* @var \Drupal\workflow\Entity\WorkflowConfigTransitionInterface[]
*/
public $transitions = [];
/**
* The module implementing this object, for config_export.
*
* @var string
*/
protected $module = 'workflow';
/**
* CRUD functions.
*/
/**
* Given information, update or insert a new workflow.
*
* This also handles importing, rebuilding, reverting from Features,
* as defined in workflow.features.inc.
*
* @todo D8: Clean up this function, since we are config entity now.
*
* When changing this function, test with the following situations:
* - maintain Workflow in Admin UI;
* - clone Workflow in Admin UI;
* - create/revert/rebuild Workflow with Features; @see workflow.features.inc
* - save Workflow programmatically;
*
* @inheritdoc
*/
public function save() {
$status = parent::save();
// Make sure a Creation state exists, when saving a Workflow.
if ($status == SAVED_NEW) {
$this
->getCreationState();
}
return $status;
}
/**
* {@inheritdoc}
*/
public static function postLoad(EntityStorageInterface $storage, array &$entities) {
/** @var \Drupal\workflow\Entity\Workflow $workflow */
foreach ($entities as &$workflow) {
// Better performance, together with Annotation static_cache = TRUE.
// Load the states, and set the creation state.
$workflow
->getStates();
$workflow
->getCreationState();
}
}
/**
* Given a wid, delete the workflow and its data.
*/
public function delete() {
if (!$this
->isDeletable()) {
$message = $this
->t('Workflow %workflow is not Deletable. Please delete the field where this workflow type is referred', [
'%workflow' => $this
->label(),
]);
$this
->messenger()
->addError($message);
return;
}
else {
// Delete associated state (also deletes any associated transitions).
foreach ($this
->getStates(TRUE) as $state) {
$state
->deactivate('');
$state
->delete();
}
// Delete the workflow.
parent::delete();
}
}
/**
* {@inheritdoc}
*/
public function isValid() {
$is_valid = TRUE;
// Don't allow Workflow without states.
// There should always be a creation state.
$states = $this
->getStates(FALSE);
if (count($states) < 1) {
// That's all, so let's remind them to create some states.
$message = $this
->t('Workflow %workflow has no states defined, so it cannot be assigned to content yet.', [
'%workflow' => $this
->label(),
]);
$this
->messenger()
->addWarning($message);
// Skip allowing this workflow.
$is_valid = FALSE;
}
// Also check for transitions, at least out of the creation state.
// Don't filter for roles.
$transitions = $this
->getTransitionsByStateId($this
->getCreationSid(), '');
if (count($transitions) < 1) {
// That's all, so let's remind them to create some transitions.
$message = $this
->t('Workflow %workflow has no transitions defined, so it cannot be assigned to content yet.', [
'%workflow' => $this
->label(),
]);
$this
->messenger()
->addWarning($message);
// Skip allowing this workflow.
$is_valid = FALSE;
}
return $is_valid;
}
/**
* {@inheritdoc}
*/
public function isDeletable() {
// May not be deleted if assigned to a Field.
foreach (_workflow_info_fields() as $field_info) {
if ($field_info
->getSetting('workflow_type') == $this
->id()) {
return FALSE;
}
}
return TRUE;
}
/**
* Property functions.
*/
/**
* {@inheritdoc}
*/
public function getWorkflowId() {
return $this
->id();
}
/**
* {@inheritdoc}
*/
public function createState($sid, $save = TRUE) {
$wid = $this
->id();
/** @var \Drupal\workflow\Entity\WorkflowState $state */
$state = WorkflowState::load($sid);
if (!$state || $wid != $state
->getWorkflowId()) {
$values = [
'id' => $sid,
'wid' => $wid,
];
$state = WorkflowState::create($values);
if ($save) {
$state
->save();
}
}
// Maintain the new object in the workflow.
$this->states[$state
->id()] = $state;
return $state;
}
/**
* {@inheritdoc}
*/
public function getCreationState() {
// First, find it.
if (!$this->creation_state) {
foreach ($this
->getStates(TRUE) as $state) {
if ($state
->isCreationState()) {
$this->creation_state = $state;
$this->creation_sid = $state
->id();
}
}
}
// Then, create it.
if (\Drupal::isConfigSyncing()) {
// Do not create the default state while configuration are importing.
}
elseif (!$this->creation_state) {
$state = $this
->createState(WORKFLOW_CREATION_STATE_NAME);
$this->creation_state = $state;
$this->creation_sid = $state
->id();
}
return $this->creation_state;
}
/**
* {@inheritdoc}
*/
public function getCreationSid() {
if (!$this->creation_sid) {
$state = $this
->getCreationState();
return $state
->id();
}
return $this->creation_sid;
}
/**
* {@inheritdoc}
*/
public function getFirstSid(EntityInterface $entity, $field_name, AccountInterface $user, $force = FALSE) {
$creation_state = $this
->getCreationState();
$options = $creation_state
->getOptions($entity, $field_name, $user, $force);
if ($options) {
$keys = array_keys($options);
$sid = $keys[0];
}
else {
// This should never happen, but it did during testing.
$this
->messenger()
->addError($this
->t('There are no workflow states available. Please notify your site administrator.'));
$sid = 0;
}
return $sid;
}
/**
* {@inheritdoc}
*/
public function getNextSid(EntityInterface $entity, $field_name, AccountInterface $user, $force = FALSE) {
$current_sid = WorkflowManager::getCurrentStateId($entity, $field_name);
/** @var \Drupal\workflow\Entity\WorkflowState $current_state */
$current_state = WorkflowState::load($current_sid);
$options = $current_state
->getOptions($entity, $field_name, $user, $force);
// Loop over every option. To find the next one.
$flag = $current_state
->isCreationState();
$new_sid = $current_state
->id();
foreach ($options as $sid => $name) {
if ($flag) {
$new_sid = $sid;
break;
}
if ($sid == $current_state
->id()) {
$flag = TRUE;
}
}
return $new_sid;
}
/**
* {@inheritdoc}
*/
public function getStates($all = FALSE, $reset = FALSE) {
$wid = $this
->id();
if ($reset) {
$this->states = $wid ? WorkflowState::loadMultiple([], $wid, $reset) : [];
}
elseif ($this->states === NULL) {
$this->states = $wid ? WorkflowState::loadMultiple([], $wid, $reset) : [];
}
elseif ($this->states === []) {
$this->states = $wid ? WorkflowState::loadMultiple([], $wid, $reset) : [];
}
// Do not unset, but add to array - you'll remove global objects otherwise.
$states = [];
foreach ($this->states as $state) {
$id = $state
->id();
if ($all === TRUE) {
$states[$id] = $state;
}
elseif ($all === FALSE && ($state
->isActive() && !$state
->isCreationState())) {
$states[$id] = $state;
}
elseif ($all == 'CREATION' && ($state
->isActive() || $state
->isCreationState())) {
$states[$id] = $state;
}
else {
// Do not add state.
}
}
return $states;
}
/**
* {@inheritdoc}
*/
public function getState($sid) {
$wid = $this
->id();
$state = WorkflowState::load($sid);
if (!$wid || $wid == $state
->getWorkflowId()) {
return $state;
}
return NULL;
}
/**
* {@inheritdoc}
*/
public function createTransition($from_sid, $to_sid, array $values = []) {
$config_transition = NULL;
// First check if this transition already exists.
$transitions = $this
->getTransitionsByStateId($from_sid, $to_sid);
if ($transitions) {
$config_transition = reset($transitions);
}
else {
$values['wid'] = $this
->id();
$values['from_sid'] = $from_sid;
$values['to_sid'] = $to_sid;
$config_transition = WorkflowConfigTransition::create($values);
$config_transition
->save();
}
// Maintain the new object in the workflow.
$this->transitions[$config_transition
->id()] = $config_transition;
return $config_transition;
}
/**
* {@inheritdoc}
*/
public function sortTransitions() {
// Sort the transitions on state weight.
uasort($this->transitions, [
'Drupal\\workflow\\Entity\\WorkflowConfigTransition',
'sort',
]);
}
/**
* {@inheritdoc}
*/
public function getTransitions(array $ids = NULL, array $conditions = []) {
$config_transitions = [];
// Get filters on 'from' states, 'to' states, roles.
$from_sid = isset($conditions['from_sid']) ? $conditions['from_sid'] : FALSE;
$to_sid = isset($conditions['to_sid']) ? $conditions['to_sid'] : FALSE;
// Get valid states + creation state.
$states = $this
->getStates('CREATION');
// Cache all transitions in the workflow.
if (!$this->transitions) {
$this->transitions = WorkflowConfigTransition::loadMultiple($ids);
$this
->sortTransitions();
}
/** @var \Drupal\workflow\Entity\WorkflowConfigTransition $config_transition */
foreach ($this->transitions as &$config_transition) {
if (!isset($states[$config_transition
->getFromSid()])) {
// Not a valid transition for this workflow. @todo Delete them.
}
elseif ($from_sid && $from_sid != $config_transition
->getFromSid()) {
// Not the requested 'from' state.
}
elseif ($to_sid && $to_sid != $config_transition
->getToSid()) {
// Not the requested 'to' state.
}
else {
// Transition is allowed, permitted. Add to list.
$config_transitions[$config_transition
->id()] = $config_transition;
}
}
return $config_transitions;
}
/**
* {@inheritdoc}
*/
public function getTransitionsById($tid) {
return $this
->getTransitions([
$tid,
]);
}
/**
* {@inheritdoc}
*/
public function getTransitionsByStateId($from_sid, $to_sid) {
$conditions = [
'from_sid' => $from_sid,
'to_sid' => $to_sid,
];
return $this
->getTransitions(NULL, $conditions);
}
/*
* The following is copied from interface PluginSettingsInterface.
*/
/**
* Whether default settings have been merged into the current $settings.
*
* @var bool
*/
protected $defaultSettingsMerged = FALSE;
/**
* {@inheritdoc}
*/
public static function defaultSettings() {
return [
'name_as_title' => 0,
'fieldset' => 0,
'options' => 'radios',
'schedule_enable' => 1,
'schedule_timezone' => 1,
'always_update_entity' => 0,
'comment_log_node' => '1',
'watchdog_log' => TRUE,
];
}
/**
* {@inheritdoc}
*/
public function getSettings() {
// Merge defaults before returning the array.
if (!$this->defaultSettingsMerged) {
$this
->mergeDefaults();
}
return $this->options;
}
/**
* {@inheritdoc}
*/
public function getSetting($key) {
// Merge defaults if we have no value for the key.
if (!$this->defaultSettingsMerged && !array_key_exists($key, $this->options)) {
$this
->mergeDefaults();
}
return isset($this->options[$key]) ? $this->options[$key] : NULL;
}
/**
* Merges default settings values into $settings.
*/
protected function mergeDefaults() {
$this->options += static::defaultSettings();
$this->defaultSettingsMerged = TRUE;
}
/**
* {@inheritdoc}
*/
public function setSettings(array $settings) {
$this->options = $settings;
$this->defaultSettingsMerged = FALSE;
return $this;
}
/**
* {@inheritdoc}
*/
public function setSetting($key, $value) {
$this->options[$key] = $value;
return $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 | 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 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 |
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 |
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 | 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:: |
public | function |
Gets the entity UUID (Universally Unique Identifier). Overrides EntityInterface:: |
1 |
EntityBase:: |
protected | function | Gets the UUID generator. | |
MessengerTrait:: |
protected | property | The messenger. | 29 |
MessengerTrait:: |
public | function | Gets the messenger. | 29 |
MessengerTrait:: |
public | function | Sets the messenger. | |
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 | ||
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. | |
SynchronizableEntityTrait:: |
protected | property | Whether this entity is being created, updated or deleted through a synchronization process. | |
SynchronizableEntityTrait:: |
public | function | ||
SynchronizableEntityTrait:: |
public | function | ||
Workflow:: |
private | property | The workflow-specific creation state ID. | |
Workflow:: |
private | property | The workflow-specific creation state. | |
Workflow:: |
protected | property | Whether default settings have been merged into the current $settings. | |
Workflow:: |
public | property | The machine name. | |
Workflow:: |
public | property | The human readable name. | |
Workflow:: |
protected | property | The module implementing this object, for config_export. | |
Workflow:: |
public | property | The Workflow settings (which would be a better name). | |
Workflow:: |
public | property | Attached States. | |
Workflow:: |
public | property | Attached Transitions. | |
Workflow:: |
public | function |
Create a new state for this workflow. Overrides WorkflowInterface:: |
|
Workflow:: |
public | function |
Creates a Transition for this workflow. Overrides WorkflowInterface:: |
|
Workflow:: |
public static | function |
Defines the default settings for this plugin. Overrides WorkflowInterface:: |
|
Workflow:: |
public | function |
Given a wid, delete the workflow and its data. Overrides EntityBase:: |
|
Workflow:: |
public | function |
Gets the ID of the initial state for a newly created entity. Overrides WorkflowInterface:: |
|
Workflow:: |
public | function |
Gets the initial state for a newly created entity. Overrides WorkflowInterface:: |
|
Workflow:: |
public | function |
Gets the first valid state ID, after the creation state. Overrides WorkflowInterface:: |
|
Workflow:: |
public | function |
Returns the next state for the current state. Overrides WorkflowInterface:: |
|
Workflow:: |
public | function |
Returns the value of a setting, or its default value if absent. Overrides WorkflowInterface:: |
|
Workflow:: |
public | function |
Returns the array of settings, including defaults for missing settings. Overrides WorkflowInterface:: |
|
Workflow:: |
public | function |
Gets a state for a given workflow. Overrides WorkflowInterface:: |
|
Workflow:: |
public | function |
Gets all states for a given workflow. Overrides WorkflowInterface:: |
|
Workflow:: |
public | function |
Loads all allowed ConfigTransitions for this workflow. Overrides WorkflowInterface:: |
|
Workflow:: |
public | function |
Overrides WorkflowInterface:: |
|
Workflow:: |
public | function |
Get a specific transition. Overrides WorkflowInterface:: |
|
Workflow:: |
public | function |
Returns the workflow id. Overrides WorkflowInterface:: |
|
Workflow:: |
public | function |
Returns if the Workflow may be deleted. Overrides WorkflowInterface:: |
|
Workflow:: |
public | function |
Validate the workflow. Generate a message if not correct. Overrides WorkflowInterface:: |
|
Workflow:: |
protected | function | Merges default settings values into $settings. | |
Workflow:: |
public static | function |
Acts on loaded entities. Overrides EntityBase:: |
|
Workflow:: |
public | function |
Given information, update or insert a new workflow. Overrides ConfigEntityBase:: |
|
Workflow:: |
public | function |
Sets the value of a setting for the plugin. Overrides WorkflowInterface:: |
|
Workflow:: |
public | function |
Sets the settings for the plugin. Overrides WorkflowInterface:: |
|
Workflow:: |
public | function |
Sorts all Transitions for this workflow, according to State weight. Overrides WorkflowInterface:: |
|
WorkflowURLRouteParametersTrait:: |
protected | function |