Пример #1
0
 /**
  * Get all entities
  *
  * @param integer $first
  * @param integer $limit
  * @param string $entityType
  * @throws Exception
  * @return array
  */
 public function getAllEntities($first, $limit, $entityType = null)
 {
     if (null != ($entities = $this->searchEntityDao->findAllEntities($first, $limit, $entityType))) {
         // get entities' tags
         foreach ($entities as &$entity) {
             if (null != ($tags = $this->searchEntityTagDao->findTags($entity['id']))) {
                 foreach ($tags as $tag) {
                     $entity['tags'][] = $tag->entityTag;
                 }
             }
         }
     }
     return $entities;
 }