Ejemplo n.º 1
0
 public function addEntity($entityType, $entityId, $userId, array $data = array())
 {
     $dto = $this->entityDao->findEntity($entityType, $entityId);
     if ($dto === null) {
         $dto = new MODERATION_BOL_Entity();
     }
     if (!empty($data)) {
         $dto->setData($data);
     }
     $dto->userId = $userId;
     $dto->timeStamp = time();
     $dto->entityType = $entityType;
     $dto->entityId = $entityId;
     $this->entityDao->save($dto);
 }