本文整理匯總了PHP中Backend\Core\Engine\Model::getURL方法的典型用法代碼示例。如果您正苦於以下問題:PHP Model::getURL方法的具體用法?PHP Model::getURL怎麽用?PHP Model::getURL使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Backend\Core\Engine\Model
的用法示例。
在下文中一共展示了Model::getURL方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: execute
public function execute()
{
parent::execute();
try {
$id = Uuid::fromString($this->getParameter('id', 'string'));
$teamMember = $this->get('team_repository')->find($id);
} catch (\Exception $e) {
return $this->redirect(Model::createURLForAction('Index') . '&error=non-existing');
}
$form = new TeamType('edit', $teamMember);
if ($form->handle()) {
$teamMember = $form->getData();
$this->get('team_repository')->save($teamMember);
return $this->redirect(Model::createURLForAction('Index') . '&report=edited' . '&highlight=row-' . $teamMember->getId());
}
// assign the detail url to the template if available
$url = Model::getURLForBlock($this->URL->getModule(), 'Detail');
if (Model::getURL(404) != $url) {
$this->tpl->assign('detailURL', SITE_URL . $url);
}
$form->parse($this->tpl);
$this->tpl->assign('teamMember', $teamMember->toArray());
$this->parse();
$this->display();
}
示例2: parse
public function parse()
{
parent::parse();
$url = BackendModel::getURLForBlock($this->URL->getModule(), 'Category');
$url404 = BackendModel::getURL(404);
if ($url404 != $url) {
$this->tpl->assign('detailURL', SITE_URL . $url);
}
}
示例3: parse
/**
* Parse the page
*/
protected function parse()
{
parent::parse();
// assign the url for the detail page
$url = BackendModel::getURLForBlock($this->URL->getModule(), 'Group');
$url404 = BackendModel::getURL(404);
if ($url404 != $url) {
$this->tpl->assign('detailURL', SITE_URL . $url);
}
}
示例4: parse
/**
* Parse the page
*/
protected function parse()
{
parent::parse();
$this->tpl->assign('item', $this->record);
$this->tpl->assign('iframe', BackendModel::createURLForAction('preview') . "&id=" . $this->id);
// get url
$url = BackendModel::getURLForBlock($this->URL->getModule(), 'detail');
$url404 = BackendModel::getURL(404);
if ($url404 != $url) {
$this->tpl->assign('detailURL', SITE_URL . $url);
}
}
示例5: parse
/**
* Parse the form
*/
protected function parse()
{
parent::parse();
// assign the data
$this->tpl->assign('item', $this->record);
$this->tpl->assign('showFaqDeleteCategory', BackendFaqModel::deleteCategoryAllowed($this->id) && BackendAuthentication::isAllowedAction('DeleteCategory'));
$url = BackendModel::getURLForBlock($this->URL->getModule(), 'Category');
$url404 = BackendModel::getURL(404);
if ($url404 != $url) {
$this->tpl->assign('detailURL', SITE_URL . $url);
}
}
示例6: parse
/**
* Parse the page
*/
protected function parse()
{
parent::parse();
// Get url
$url = Model::getURLForBlock($this->URL->getModule(), 'Detail');
$url404 = Model::getURL(404);
// Parse additional variables
if ($url404 != $url) {
$this->tpl->assign('detailURL', SITE_URL . $url);
}
$this->tpl->assign('item', $this->record);
}
示例7: 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);
}
示例8: execute
public function execute()
{
parent::execute();
$form = new TeamType('add');
if ($form->handle()) {
$teamMember = $form->getData();
$this->get('team_repository')->add($teamMember);
return $this->redirect(Model::createURLForAction('Index') . '&report=added' . '&highlight=row-' . $teamMember->getId());
}
// assign the detail url to the template if available
$url = Model::getURLForBlock($this->URL->getModule(), 'Detail');
if (Model::getURL(404) != $url) {
$this->tpl->assign('detailURL', SITE_URL . $url);
}
$form->parse($this->tpl);
$this->parse();
$this->display();
}
示例9: 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);
}
}
示例10: parse
/**
* Parse the form
*
* @return void
*/
protected function parse()
{
//--Add javascript file
$this->header->addJS('Jquery.uploadify.min.js', null, false);
$this->header->addJS('Edit.js', null, false);
$this->header->addCSS('Uploadify.css');
// call parent
parent::parse();
// assign the category
$this->tpl->assign('album', $this->record);
$this->tpl->assign('images', $this->images);
if ($this->frmAddImage) {
$this->frmAddImage->parse($this->tpl);
}
if ($this->frmDeleteImage) {
$this->frmDeleteImage->parse($this->tpl);
}
//--Add data to Javascript
$this->header->addJsData("Galleria", "id", $this->id);
// can the category be deleted?
if (BackendGalleriaModel::deleteAlbumAllowed($this->id)) {
$this->tpl->assign('showDelete', true);
}
// get url
$url = BackendModel::getURLForBlock($this->URL->getModule(), 'group');
$url404 = BackendModel::getURL(404);
if ($url404 != $url) {
$this->tpl->assign('detailURL', SITE_URL . $url);
}
}
示例11: parse
/**
* Parse the page
*/
protected function parse()
{
parent::parse();
$this->tpl->assign('item', $this->record);
// get url
$url = BackendModel::getURLForBlock($this->URL->getModule(), 'Detail');
$url404 = BackendModel::getURL(404);
if ($url404 != $url) {
$this->tpl->assign('detailURL', SITE_URL . $url);
}
$this->tpl->assign("fieldLanguages", $this->fieldLanguages);
}
示例12: parse
/**
* Parse the page
*/
protected function parse()
{
parent::parse();
$this->header->addJS('edit.js');
$this->tpl->assign('item', $this->record);
// get url
$url = BackendModel::getURLForBlock($this->URL->getModule(), 'Group');
$url404 = BackendModel::getURL(404);
if ($url404 != $url) {
$this->tpl->assign('detailURL', SITE_URL . $url);
}
}
示例13: parse
/**
* Parse the form
*
* @return void
*/
protected function parse()
{
// call parent
parent::parse();
$url = BackendModel::getURLForBlock($this->URL->getModule(), 'Detail');
$url404 = BackendModel::getURL(404);
// parse additional variables
if ($url404 != $url) {
$this->tpl->assign('detailURL', SITE_URL . $url);
}
// assign categories
$this->tpl->assign('categories', $this->categories);
}
示例14: parse
/**
* Parse the form
*
* @return void
*/
protected function parse()
{
// call parent
parent::parse();
$url = BackendModel::getURLForBlock($this->URL->getModule(), 'Detail');
$url404 = BackendModel::getURL(404);
// parse additional variables
if ($url404 != $url) {
$this->tpl->assign('detailURL', SITE_URL . $url);
}
// assign
$this->tpl->assign('item', $this->record);
$this->tpl->assign('dataGrid', $this->dataGrid->getNumResults() != 0 ? $this->dataGrid->getContent() : false);
$this->tpl->assign('categories', $this->categories);
$this->tpl->assign('imageCount', BackendSlideshowModel::getImagesByGallery($this->id));
// settings allowed?
$this->tpl->assign('settingsPerSlideshow', $this->get('fork.settings')->get('Slideshow', 'settings_per_slide'));
}
示例15: parse
/**
* Parse the page
*/
protected function parse()
{
parent::parse();
// add css
$this->header->addCSS('/src/Backend/Modules/' . $this->getModule() . '/Layout/Css/agenda.css', null, true);
// 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);
}
$this->record['url'] = $this->meta->getURL();
$this->tpl->assign('item', $this->record);
$this->tpl->assign('mediaItems', $this->media->getMediaItems());
}