/** * */ public function display() { $sections =& $this->get('sections'); $_sections = array(); if (count($sections)) { foreach ($sections as $section) { $name = $section->get('name'); $id = $section->get('id'); $url = Sobi::Url(array('sid' => $id)); $_section = array(); $_section['id'] = $id; $_section['nid'] = $section->get('nid'); $_section['name'] = "<a href=\"{$url}\">{$name}</a>"; // $_section[ 'entries_counter' ] = $section->countChilds( 'entry' ); // $_section[ 'categories_counter' ] = $section->countChilds( 'category' ); // $_section[ 'state' ] = SPLists::state( $section ); // $_section[ 'checkbox' ] = SPLists::checkedOut( $section, 'sid' ); $_section['createdTime'] = $section->get('createdTime'); $_section['metaDesc'] = $section->get('metaDesc'); $_section['metaKey'] = $section->get('metaKey'); $_section['description'] = $section->get('description'); $_section['url'] = $url; $_sections[] = $_section; } } $this->set($_sections, 'sections'); parent::display(); }
public function display() { switch ($this->get('task')) { case 'edit': $this->edit(); break; } parent::display(); }
/** * */ public function _display() { SPLoader::loadClass('html.tooltip'); switch ($this->get('task')) { case 'edit': $this->assign($this->languages(), 'languages-list'); case 'add': $this->edit(); break; } parent::display(); }
public function display() { switch ($this->get('task')) { case 'list': $this->errors(); $this->determineTemplate('config', 'errors'); break; case 'details': $this->details(); $this->determineTemplate('config', 'error'); break; } parent::display(); }
/** * */ public function display() { switch ($this->get('task')) { case 'view': $this->listSection(); $this->determineTemplate('section', 'list'); break; case 'entries': $this->listSection(); $this->determineTemplate('section', 'entries'); break; } parent::display(); }
/** */ public function display() { switch (trim($this->get('task'))) { case 'list': parent::display(); break; case 'edit': case 'add': $this->displayForm(); break; default: parent::display(); break; } }
/** * @param string $title * @return string */ public function setTitle($title) { $name = $this->get('rule'); Sobi::Trigger('setTitle', $this->name(), array(&$title)); $title = Sobi::Txt($title, array('rule_name' => $name)); $title = parent::setTitle($title); return $title; }
/** * * @param mixed $attr * @param int $index * @return mixed */ public function &get($attr, $index = -1) { $config = SPFactory::config(); if (!$config->key($attr, false)) { return parent::get($attr, $index); } else { $value = $config->key($attr); // WHY?! For gods' sake - write comments to your code you fraking idiot!!!! // Tue, Jun 4, 2013 15:21:19 : got that - we have some arrays that have to be displayed as a string while editing config // see also bug #894 // if ( is_array( $attr ) ) { // $attr = implode( ',', $attr ); // } // ... let's fix it ;) if (is_array($value) && strstr($attr, '_array')) { $value = implode(',', $value); } return $value; } }
/** * @param string $title * @return string */ public function setTitle($title) { $title = parent::setTitle($title); return $title; }