本文整理汇总了PHP中Core_Model_Default::getUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Core_Model_Default::getUrl方法的具体用法?PHP Core_Model_Default::getUrl怎么用?PHP Core_Model_Default::getUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Core_Model_Default
的用法示例。
在下文中一共展示了Core_Model_Default::getUrl方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getUrl
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;
}
示例2: getBundleId
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;
}
示例3: getPages
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;
}
示例4: getUrl
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;
}