예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function __construct(TransitionHandlerFactory $handlerFactory, StateRepository $stateRepository, $workflows = array())
 {
     parent::__construct($handlerFactory, $stateRepository, $workflows);
     $message = '"Netzmacht\\Workflow\\Manager"" is deprecated and will be removed in v1.0.0 stable.';
     $message .= ' Use "Netzmacht\\Workflow\\Manager\\WorkflowManager" instead.';
     trigger_error($message, E_USER_DEPRECATED);
 }
예제 #2
0
 /**
  * Create the item.
  *
  * It also converts the entity to a ModelInterface instance.
  *
  * @param EntityId $entityId The entity id.
  * @param mixed    $model    The data model.
  *
  * @return Item
  */
 public function createItem(EntityId $entityId, $model)
 {
     $event = new CreateEntityEvent($model, $entityId->getProviderName());
     $this->eventDispatcher->dispatch($event::NAME, $event);
     return parent::createItem($entityId, $event->getEntity());
 }