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); }
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); }
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); }
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); }
public function getAvailableAttributes() { return \Concrete\Core\Attribute\Key\CollectionKey::getList(); }
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; }
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'); }