public function setAttributeSet($as) { if (!is_object($as)) { $as = AttributeSet::getByHandle($as); } $as->addKey($this); }
private function installAdditionalPageAttributes($pkg) { $bpa = AttributeSet::getByHandle('boilerplate_page_attributes'); // see install page attributes section for syntax }
public function update_set() { $this->edit($this->post('asID')); if ($this->token->validate('update_set')) { $as = AttributeSet::getByID($this->post('asID')); if (!is_object($as)) { $this->error->add(t('Invalid attribute set.')); } else { if (!trim($this->post('asHandle')) && !$as->isAttributeSetLocked()) { $this->error->add(t("Specify a handle for your attribute set.")); } else { $asx = AttributeSet::getByHandle($this->post('asHandle')); if (is_object($asx) && $asx->getAttributeSetID() != $as->getAttributeSetID()) { $this->error->add(t('That handle is in use.')); } } if (!trim($this->post('asName'))) { $this->error->add(t("Specify a name for your attribute set.")); } } if (!$this->error->has()) { if (!$as->isAttributeSetLocked()) { $as->updateAttributeSetHandle($this->post('asHandle')); } $as->updateAttributeSetName($this->post('asName')); $this->redirect('dashboard/system/attributes/sets', 'category', $as->getAttributeSetKeyCategoryID(), 'set_updated'); } } else { $this->error->add($this->token->getErrorMessage()); } }
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); $df = Loader::helper('form/date_time'); $form = Loader::helper('form'); $fp = FilePermissions::getGlobal(); $tp = new TaskPermission(); $set = AttributeSet::getByHandle('problog_additional_attributes'); $setAttribs = $set->getAttributeKeys(); $AJAXblogPost = URL::to('/problog/tools/post_blog'); ?> <link rel="stylesheet" type="text/css" href="<?php echo DIR_REL; ?> /concrete/css/redactor.css"></link> <link rel="stylesheet" type="text/css" href="<?php echo DIR_REL; ?> /concrete/css/select2.css"></link> <link rel="stylesheet" type="text/css" href="<?php echo DIR_REL; ?> /concrete/css/file-manager.css"></link> <script type="text/javascript" src="<?php echo DIR_REL; ?> /concrete/js/redactor.js"></script> <script type="text/javascript" src="<?php echo DIR_REL; ?>