protected function createWorkflowBindEntity($entityId, $entityClass)
 {
     $result = new WorkflowBindEntity();
     $result->setEntityId($entityId);
     $result->setEntityClass($entityClass);
     return $result;
 }
 /**
  * @param array $entitiesToBind
  * @return WorkflowBindEntity[]
  */
 protected function createBindEntities(array $entitiesToBind)
 {
     $result = array();
     foreach ($entitiesToBind as $entity) {
         if ($entity) {
             $bindEntity = new WorkflowBindEntity();
             $bindEntity->setEntityClass($this->doctrineHelper->getEntityClass($entity));
             $bindEntity->setEntityId($this->doctrineHelper->getEntityIdentifier($entity));
             $result[] = $bindEntity;
         }
     }
     return $result;
 }
 /**
  * @param string $entityClass
  * @param mixed $entityId
  * @return WorkflowBindEntity
  */
 protected function createBindEntity($entityClass = null, $entityId = null)
 {
     $result = new WorkflowBindEntity();
     if ($entityClass) {
         $result->setEntityClass($entityClass);
     }
     if ($entityId) {
         $result->setEntityId($entityId);
     }
     return $result;
 }