public function on_start() { parent::on_start(); $this->set('category', AttributeKeyCategory::getByHandle('collection')); $otypes = AttributeType::getAttributeTypeList('collection'); $types = array(); foreach ($otypes as $at) { $types[$at->getAttributeTypeID()] = $at->getAttributeTypeDisplayName(); } $this->set('types', $types); }
public function getResults(Request $request) { $list = Type::getAttributeTypeList(); $items = array(); foreach ($list as $type) { $attributeType = new \PortlandLabs\Concrete5\MigrationTool\Entity\Export\AttributeType(); $attributeType->setItemId($type->getAttributeTypeID()); $items[] = $attributeType; } return $items; }
<?php defined('C5_EXECUTE') or die("Access Denied."); use Concrete\Core\Attribute\Type as AttributeType; use Concrete\Core\Attribute\Key\Category as AttributeKeyCategory; use Concrete\Core\Attribute\PendingType as PendingAttributeType; $types = AttributeType::getAttributeTypeList(); $categories = AttributeKeyCategory::getList(); $txt = Loader::helper('text'); $form = Loader::helper('form'); $interface = Loader::helper('concrete/ui'); $valt = Core::make('token'); ?> <form method="post" class="" id="attribute_type_associations_form" action="<?php echo $view->action('save_attribute_type_associations'); ?> "> <?php $valt->output('save_attribute_type_associations'); ?> <table border="0" cellspacing="1" cellpadding="0" border="0" class="table"> <tr> <th><?php echo t('Name'); ?> </th> <?php foreach ($categories as $cat) { ?> <th><?php echo $txt->unhandle($cat->getAttributeKeyCategoryHandle());
public function view($id = null) { $entity = $this->getEntity($id); $this->set('entity', $entity); $this->renderList($entity->getAttributes(), Type::getAttributeTypeList()); }