Exemplo n.º 1
0
 public function view($ptID = false)
 {
     $this->setupPageType($ptID);
     $this->requireAsset('core/app/editable-fields');
     $this->set('pagetype', $this->pagetype);
     $this->set('defaultPage', $this->defaultPage);
     $attributes = CollectionKey::getList();
     $this->set('attributes', $attributes);
 }
Exemplo n.º 2
0
 public function edit()
 {
     $this->requireAsset('core/topics');
     $tt = new TopicTree();
     $defaultTree = $tt->getDefault();
     $tree = $tt->getByID(Loader::helper('security')->sanitizeInt($this->topicTreeID));
     if (!$tree) {
         $tree = $defaultTree;
     }
     $trees = $tt->getList();
     $keys = CollectionKey::getList();
     foreach ($keys as $ak) {
         if ($ak->getAttributeTypeHandle() == 'topics') {
             $attributeKeys[] = $ak;
         }
     }
     $this->set('attributeKeys', $attributeKeys);
     $this->set('tree', $tree);
     $this->set('trees', $trees);
 }
Exemplo n.º 3
0
 public function loadData()
 {
     $this->requireAsset('core/express');
     $r = $this->entityManager->getRepository('Concrete\\Core\\Entity\\Express\\Entity');
     $entityObjects = $r->findAll();
     $entities = array('' => t("** Choose Entity"));
     foreach ($entityObjects as $entity) {
         $entities[$entity->getID()] = $entity->getName();
     }
     $this->set('entities', $entities);
     $keys = CollectionKey::getList();
     foreach ($keys as $ak) {
         if ($ak->getAttributeTypeHandle() == 'express') {
             $attributeKeys[] = $ak;
         }
     }
     $this->set('expressAttributes', $attributeKeys);
 }
Exemplo n.º 4
0
 protected function loadKeys()
 {
     $attributeKeys = array();
     $keys = CollectionKey::getList(array('atHandle' => 'topics'));
     foreach ($keys as $ak) {
         if ($ak->getAttributeTypeHandle() == 'topics') {
             $attributeKeys[] = $ak;
         }
     }
     $this->set('attributeKeys', $attributeKeys);
 }
Exemplo n.º 5
0
 public function getAvailableAttributes()
 {
     return \Concrete\Core\Attribute\Key\CollectionKey::getList();
 }
Exemplo n.º 6
0
 public function getInstalledTargetItems(Batch $batch)
 {
     $keys = CollectionKey::getList();
     usort($keys, function ($a, $b) {
         return strcasecmp($a->getAttributeKeyName(), $b->getAttributeKeyName());
     });
     $items = array();
     foreach ($keys as $ak) {
         $item = new TargetItem($this);
         $item->setItemId($ak->getAttributeKeyHandle());
         $item->setItemName($ak->getAttributeKeyDisplayName());
         $items[] = $item;
     }
     return $items;
 }
Exemplo n.º 7
-1
 public function add()
 {
     $pageTypes = array('' => t('** No Filtering'));
     $types = Type::getList();
     foreach ($types as $type) {
         $pageTypes[$type->getPageTypeID()] = $type->getPageTypeDisplayName();
     }
     $this->set('pageTypes', $pageTypes);
     $attributeKeys = array();
     $keys = CollectionKey::getList();
     foreach ($keys as $ak) {
         if ($ak->getAttributeTypeHandle() == 'topics') {
             $attributeKeys[] = $ak;
         }
     }
     $this->set('topicAttributes', $attributeKeys);
     $areas = Area::getHandleList();
     $select = array();
     foreach ($areas as $handle) {
         $select[$handle] = $handle;
     }
     $this->set('areas', $select);
     $this->requireAsset('core/topics');
 }