You are here

protected function ModerationStateTransitionStorage::doCreate in Workbench Moderation 8

Same name and namespace in other branches
  1. 8.2 src/ModerationStateTransitionStorage.php \Drupal\workbench_moderation\ModerationStateTransitionStorage::doCreate()

Performs storage-specific creation of entities.

Parameters

array $values: An array of values to set, keyed by property name.

Return value

\Drupal\Core\Entity\EntityInterface

Overrides ConfigEntityStorage::doCreate

File

src/ModerationStateTransitionStorage.php, line 52

Class

ModerationStateTransitionStorage
Define class for moderation state transitions.

Namespace

Drupal\workbench_moderation

Code

protected function doCreate(array $values) {

  /* @var \Drupal\workbench_moderation\ModerationStateTransitionInterface $entity */
  $entity = parent::doCreate($values);
  return $entity
    ->setModerationStateConfigPrefix($this->entityTypeManager
    ->getDefinition('moderation_state')
    ->getConfigPrefix());
}