Example #1
0
 function addEntityToJs(MapasCulturais\Entity $entity)
 {
     $this->jsObject['entity'] = ['id' => $entity->id, 'ownerId' => $entity->owner->id, 'ownerUserId' => $entity->ownerUser->id, 'definition' => $entity->getPropertiesMetadata(), 'userHasControl' => $entity->canUser('@control'), 'canUserCreateRelatedAgentsWithControl' => $entity->canUser('createAgentRelationWithControl'), 'status' => $entity->status, 'object' => $entity];
     if ($entity->usesNested() && $entity->id) {
         $this->jsObject['entity']['childrenIds'] = $entity->getChildrenIds();
     }
 }