class ClearDeriver in Workbench Moderation to Content Moderation 8.2
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\wbm2cm\Plugin\migrate\source\ContentEntityDeriver implements ContainerDeriverInterface
- class \Drupal\wbm2cm\Plugin\Deriver\ModerationDeriver
- class \Drupal\wbm2cm\Plugin\Deriver\SaveDeriver
- class \Drupal\wbm2cm\Plugin\Deriver\ClearDeriver
- class \Drupal\wbm2cm\Plugin\Deriver\SaveDeriver
- class \Drupal\wbm2cm\Plugin\Deriver\ModerationDeriver
- class \Drupal\wbm2cm\Plugin\migrate\source\ContentEntityDeriver implements ContainerDeriverInterface
Expanded class hierarchy of ClearDeriver
1 string reference to 'ClearDeriver'
- wbm2cm_clear.yml in migrations/
wbm2cm_clear.yml - migrations/wbm2cm_clear.yml
File
- src/
Plugin/ Deriver/ ClearDeriver.php, line 5
Namespace
Drupal\wbm2cm\Plugin\DeriverView source
class ClearDeriver extends SaveDeriver {
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
$this->derivatives = parent::getDerivativeDefinitions($base_plugin_definition);
foreach ($this->derivatives as $id => &$derivative) {
$entity_type = $this->entityTypeManager
->getDefinition($id);
$key = $entity_type
->getKey('id');
$derivative['process'][$key] = $key;
if ($entity_type
->isRevisionable()) {
$key = $entity_type
->getKey('revision');
$derivative['process'][$key] = $key;
}
if ($entity_type
->isTranslatable()) {
$key = $entity_type
->getKey('langcode');
$derivative['process'][$key] = $key;
}
$derivative['destination']['plugin'] = "entity_revision:{$id}";
$derivative['migration_dependencies']['required'][] = "wbm2cm_save:{$id}";
}
return $this->derivatives;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ClearDeriver:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides SaveDeriver:: |
|
ContentEntityDeriver:: |
protected | property | The entity type manager service. | |
DeriverBase:: |
protected | property | List of derivative definitions. | 1 |
DeriverBase:: |
public | function |
Gets the definition of a derivative plugin. Overrides DeriverInterface:: |
|
ModerationDeriver:: |
protected | property | The moderatable entity type IDs. | |
ModerationDeriver:: |
public static | function |
Creates a new class instance. Overrides ContentEntityDeriver:: |
|
ModerationDeriver:: |
protected | function |
Determines if an entity type can be used by the derived plugin. Overrides ContentEntityDeriver:: |
|
ModerationDeriver:: |
public | function |
EntityModerationStateDeriver constructor. Overrides ContentEntityDeriver:: |