protected function getAttributes() { $list = AttributeFormKey::getList(); $attributes = array(); foreach ($list as $item) { $attributes[$item->getAttributeKeyHandle()] = $item; } return $attributes; }
public function view($message = false) { // set action message if set switch ($message) { case 'attribute_created': $this->set('message', t('Attribute created')); break; case 'attribute_updated': $this->set('message', t('Attribute updated')); break; case 'attribute_deleted': $this->set('message', t('Attribute deleted')); break; } $attribs = AttributeFormKey::getList(); $this->set('attribs', $attribs); $this->set('types', $this->getAttributeTypes()); }