protected function __construct()
 {
     parent::__construct();
     $this->placeSchemeDao = BOL_PlaceSchemeDao::getInstance();
     $this->componentPlaceDao = BOL_ComponentPlaceDao::getInstance();
     $this->componentPositionDao = BOL_ComponentPositionDao::getInstance();
     $this->componentSettingDao = BOL_ComponentSettingDao::getInstance();
 }
Example #2
0
 public function fullActivate()
 {
     $widgetService = BOL_ComponentAdminService::getInstance();
     $widget = $widgetService->addWidget('GHEADER_CMP_HeaderWidget', false);
     $placeWidget = $widgetService->addWidgetToPlace($widget, 'group');
     try {
         $widgetService->addWidgetToPosition($placeWidget, BOL_ComponentAdminService::SECTION_TOP, 0);
     } catch (Exception $e) {
         // Log
     }
     try {
         $uniqName = 'group-GROUPS_CMP_BriefInfoWidget';
         BOL_ComponentPositionDao::getInstance()->deleteByUniqName($uniqName);
         BOL_ComponentEntityPositionDao::getInstance()->deleteAllByUniqName($uniqName);
     } catch (Exception $e) {
         // Log
     }
 }
Example #3
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));
 }
Example #4
0
 public function deleteWidgetPlace($uniqName)
 {
     $componentPlaceDao = BOL_ComponentPlaceDao::getInstance();
     $dto = $componentPlaceDao->findByUniqName($uniqName);
     if ($dto === null) {
         return;
     }
     $componentPlaceDao->deleteByUniqName($dto->uniqName);
     BOL_ComponentEntityPlaceDao::getInstance()->deleteAllByUniqName($dto->uniqName);
     BOL_ComponentSettingDao::getInstance()->deleteList($dto->uniqName);
     BOL_ComponentEntitySettingDao::getInstance()->deleteAllByUniqName($dto->uniqName);
     BOL_ComponentPositionDao::getInstance()->deleteByUniqName($dto->uniqName);
     BOL_ComponentEntityPositionDao::getInstance()->deleteAllByUniqName($dto->uniqName);
     $this->componentPlaceCacheDao->deleteAllCache($dto->placeId);
     $this->componentDao->delete($dto);
 }