Ejemplo n.º 1
0
 protected function __construct()
 {
     $this->placeDao = BOL_PlaceDao::getInstance();
     $this->componentDao = BOL_ComponentDao::getInstance();
     $this->schemeDao = BOL_SchemeDao::getInstance();
     $this->componentPlaceCacheDao = BOL_ComponentPlaceCacheDao::getInstance();
 }
Ejemplo n.º 2
0
 public function findListBySection($placeId, $section)
 {
     $componentDao = BOL_ComponentDao::getInstance();
     $componentSectionDao = BOL_ComponentPositionDao::getInstance();
     $query = '
         SELECT `c`.*, `cp`.`id`, `cp`.`componentId`, `cp`.`clone`, `cp`.`uniqName`, `p`.`order`  FROM `' . $this->getTableName() . '` AS `cp`
             INNER JOIN `' . $componentDao->getTableName() . '` AS `c` ON `cp`.`componentId` = `c`.`id`
             INNER JOIN `' . $componentSectionDao->getTableName() . '` AS `p` 
                 ON `p`.`componentPlaceUniqName` = `cp`.`uniqName`
                 WHERE `cp`.`placeId`=? AND `p`.`section`=?
     ';
     return $this->dbo->queryForList($query, array($placeId, $section));
 }
Ejemplo n.º 3
0
 public function findComponentListByIdList(array $componentIds)
 {
     $componentDao = BOL_ComponentDao::getInstance();
     $query = '
 		SELECT `c`.*, cp.`id`  FROM `' . $this->getTableName() . '` AS `cp`
 			INNER JOIN `' . $componentDao->getTableName() . '` AS `c` ON `cp`.`componentId` = `c`.`id`
 				WHERE `cp`.`componentId` IN (' . implode(', ', $componentIds) . ')
 	';
     return $this->dbo->queryForColumnList($query, array($placeId));
 }