本文整理汇总了PHP中BackendModel::getURL方法的典型用法代码示例。如果您正苦于以下问题:PHP BackendModel::getURL方法的具体用法?PHP BackendModel::getURL怎么用?PHP BackendModel::getURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BackendModel
的用法示例。
在下文中一共展示了BackendModel::getURL方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: parse
/**
* Parse the page
*/
protected function parse()
{
parent::parse();
// get url
$url = BackendModel::getURLForBlock($this->URL->getModule(), 'detail');
$url404 = BackendModel::getURL(404);
// parse additional variables
if ($url404 != $url) {
$this->tpl->assign('detailURL', SITE_URL . $url);
}
}
示例2: parse
/**
* Parse the form
*/
protected function parse()
{
parent::parse();
// get url
$url = BackendModel::getURLForBlock($this->URL->getModule(), 'detail');
$url404 = BackendModel::getURL(404);
if ($url404 != $url) {
$this->tpl->assign('detailURL', SITE_URL . $url);
}
// assign the active record and additional variables
$this->tpl->assign('item', $this->record);
$this->tpl->assign('feedback', $this->feedback);
}
示例3: parse
/**
* Parse the form
*/
protected function parse()
{
parent::parse();
// get url
$url = BackendModel::getURLForBlock($this->URL->getModule(), 'detail');
$url404 = BackendModel::getURL(404);
// parse additional variables
if ($url404 != $url) {
$this->tpl->assign('detailURL', SITE_URL . $url);
}
// fetch proper slug
$this->record['url'] = $this->meta->getURL();
// assign the active record and additional variables
$this->tpl->assign('item', $this->record);
$this->tpl->assign('status', BL::lbl(SpoonFilter::ucfirst($this->record['status'])));
// assign revisions-datagrid
$this->tpl->assign('revisions', $this->dgRevisions->getNumResults() != 0 ? $this->dgRevisions->getContent() : false);
$this->tpl->assign('drafts', $this->dgDrafts->getNumResults() != 0 ? $this->dgDrafts->getContent() : false);
$this->tpl->assign('imageIsAllowed', $this->imageIsAllowed);
// assign category
if ($this->categoryId !== null) {
$this->tpl->assign('categoryId', $this->categoryId);
}
}
示例4: loadFormForStep4
/**
* Load the form for step 4
*
* @return void
*/
private function loadFormForStep4()
{
// check if we have to redirect back to step 3 (HTML content is not set)
if (empty($this->record['content_html'])) {
$this->redirect(BackendModel::createURLForAction('edit') . '&id=' . $this->id . '&step=3&error=complete-step-3');
}
// get preview URL
$previewURL = BackendMailmotorModel::getMailingPreviewURL($this->record['id']);
// check if the mailmotor is linked
if (BackendModel::getURLForBlock($this->getModule(), 'detail') == BackendModel::getURL(404)) {
$previewURL = false;
}
// parse the preview URL
$this->tpl->assign('previewURL', $previewURL);
// create form
$this->frm = new BackendForm('step4');
// subject
$this->frm->addText('email');
$this->frm->addDate('send_on_date', $this->record['send_on']);
$this->frm->addTime('send_on_time', SpoonDate::getDate('H:i', $this->record['send_on']));
// show the form
$this->tpl->assign('step4', true);
}