public function getUrl($action, $params = array(), $feature_url = true, $env = null) { $url = null; // if($this->getIsDummy()) { // $url = '#'; // } // else if ($this->getUri()) { $uri = $this->getUri(); if (!is_null($env) and $this->getData("{$env}_uri")) { $uri = $this->getData("{$env}_uri"); } if (!$feature_url and $env != "desktop" and !$this->getIsAjax() and $this->getObject()->getLink()) { $url = (string) $this->getObject()->getLink()->getUrl(); } else { $url = parent::getUrl($uri . $action, $params); } } else { $url = '/front/index/noroute'; } return $url; }
public function getBundleId() { $bundle_id = $this->getData("bundle_id"); $bundle_id_parts = explode(".", $bundle_id); if (count($bundle_id_parts) != count(array_filter($bundle_id_parts))) { $url = Zend_Uri::factory(parent::getUrl(""))->getHost(); $url = array_reverse(explode(".", $url)); $url[] = "app" . $this->getKey(); $bundle_id = Core_Model_Lib_String::formatBundleId($url); } else { $bundle_id = Core_Model_Lib_String::formatBundleId($bundle_id_parts); } if ($bundle_id != $this->getData("bundle_id")) { $this->setBundleId($bundle_id)->save(); } return $bundle_id; }
public function getPages($samples = 0) { if (empty($this->_pages)) { $option = new Application_Model_Option_Value(); $this->_pages = $option->findAll(array('remove_folder' => new Zend_Db_Expr('folder_category_id IS NULL'), 'is_visible' => 1)); } if ($this->_pages->count() == 0 and $samples > 0) { $color = str_replace('#', '', $this->getDesignBlock('tabbar')->getImageColor()); $dummy = new Application_Model_Option(); $dummy->find('newswall', 'code'); $dummy->setTabbarName('Sample')->setIsDummy(1)->setIconUrl(parent::getUrl('template/block/colorize', array('id' => $dummy->getIconId(), 'color' => $color))); for ($i = 0; $i < $samples; $i++) { $this->_pages->addRow($this->_pages->count(), $dummy); } } return $this->_pages; }
public function getUrl($action, $params = array(), $tiger_url = true, $env = null) { $url = null; if ($this->getIsDummy()) { $url = 'javascript:void(0);'; } else { if ($this->getUri()) { $uri = $this->getUri(); if (!is_null($env) and isset($this->_xml->{$env}) and isset($this->_xml->{$env}->uri)) { $uri = $this->_xml->{$env}->uri; } if (!$tiger_url && !$this->getIsAjax() && $this->getObject()->getLink()) { $url = $this->getObject()->getLink(); } else { $url = parent::getUrl($uri . $action, $params); } } else { $url = '/front/index/noroute'; } } return $url; }