예제 #1
0
 protected function beforeDelete()
 {
     $disabled = new PageComponentsDisabledEntityRepository();
     $disabled->setWherePageId($this->getId());
     $disabled->deleteObjectCollection();
     $history = new PageComponentHistoryRepository();
     $history->setWherePageId($this->getId());
     $history->deleteObjectCollection();
     $components = new PageComponentRepository();
     $components->setWherePageId($this->getId());
     $components->deleteObjectCollection();
     $clickmap = new PageClickmapRepository();
     $clickmap->setWherePageId($this->getId());
     $clickmap->deleteObjectCollection();
     parent::beforeDelete();
 }
예제 #2
0
 /**
  * Preload all data of plugins
  */
 private static function init()
 {
     if (!self::$data_initialized) {
         self::$data_initialized = true;
         $page_components_collection = new PageComponentRepository();
         $page_components_collection->setWherePageId(PAGE_ID);
         $page_components_collection->addWhereFieldIsLike('component', 'select_plugin');
         if (Settings::isCacheEnabled()) {
             $page_components_collection->enableUsingCache();
         }
         self::$data = $page_components_collection->getPairs('data', 'component');
     }
 }