Esempio n. 1
0
 public function run()
 {
     $db = Loader::db();
     Cache::disableLocalCache();
     Loader::model('attribute/categories/collection');
     $cak = CollectionAttributeKey::getByHandle('exclude_page_list');
     if (!is_object($cak)) {
         $boolt = AttributeType::getByHandle('boolean');
         $cab4b = CollectionAttributeKey::add($boolt, array('akHandle' => 'exclude_page_list', 'akName' => t('Exclude From Page List'), 'akIsSearchable' => true));
         Loader::model('page_list');
         $pl = new PageList();
         $pl->filterByExcludeNav(1);
         $list = $pl->get();
         foreach ($list as $c) {
             $c->setAttribute('exclude_page_list', 1);
             $c->reindex();
         }
     }
     Cache::enableLocalCache();
 }