コード例 #1
0
 /**
  * @expectedException \Oro\Bundle\WorkflowBundle\Exception\WorkflowException
  * @expectedExceptionMessage Workflow item entity can not be changed
  */
 public function testSetEntityException()
 {
     $this->workflowItem->setEntity(new \stdClass());
     $this->workflowItem->setEntity(new \stdClass());
 }
コード例 #2
0
 /**
  * Deserialize data of WorkflowItem
  *
  * @param WorkflowItem $workflowItem
  */
 protected function deserialize(WorkflowItem $workflowItem)
 {
     // Pass serializer into $workflowItem to make lazy loading of workflow item data.
     $workflowItem->setSerializer($this->serializer, $this->format);
     // Set related entity
     $relatedEntity = $this->doctrineHelper->getEntityReference($workflowItem->getDefinition()->getRelatedEntity(), $workflowItem->getEntityId());
     $workflowItem->setEntity($relatedEntity);
 }