protected function __construct() { $this->placeDao = BOL_PlaceDao::getInstance(); $this->componentDao = BOL_ComponentDao::getInstance(); $this->schemeDao = BOL_SchemeDao::getInstance(); $this->componentPlaceCacheDao = BOL_ComponentPlaceCacheDao::getInstance(); }
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)); }
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)); }