Example #1
0
 /**
  * @param WorkflowDefinition $definition
  * @return WorkflowDefinition
  */
 public function import(WorkflowDefinition $definition)
 {
     $this->setName($definition->getName())->setLabel($definition->getLabel())->setRelatedEntity($definition->getRelatedEntity())->setEntityAttributeName($definition->getEntityAttributeName())->setConfiguration($definition->getConfiguration())->setSteps($definition->getSteps())->setStartStep($definition->getStartStep())->setStepsDisplayOrdered($definition->isStepsDisplayOrdered())->setEntityAcls($definition->getEntityAcls())->setSystem($definition->isSystem());
     return $this;
 }
 /**
  * @param WorkflowDefinition $definition
  * @return array
  */
 protected function getDefinitionAsArray(WorkflowDefinition $definition)
 {
     return array('name' => $definition->getName(), 'label' => $definition->getLabel(), 'steps' => $definition->getSteps(), 'start_step' => $definition->getStartStep(), 'configuration' => $definition->getConfiguration());
 }