當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Model::getURL方法代碼示例

本文整理匯總了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();
 }
開發者ID:WouterSioen,項目名稱:fork-cms-module-team,代碼行數:25,代碼來源:Edit.php

示例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);
     }
 }
開發者ID:forkcms,項目名稱:forkcms,代碼行數:9,代碼來源:AddCategory.php

示例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);
     }
 }
開發者ID:Comsa-Veurne,項目名稱:modules,代碼行數:13,代碼來源:AddGroup.php

示例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);
     }
 }
開發者ID:Comsa-Veurne,項目名稱:modules,代碼行數:15,代碼來源:Edit.php

示例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);
     }
 }
開發者ID:forkcms,項目名稱:forkcms,代碼行數:15,代碼來源:EditCategory.php

示例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);
 }
開發者ID:jeroendesloovere,項目名稱:fork-cms-module-instagram,代碼行數:15,代碼來源:Edit.php

示例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);
 }
開發者ID:bwgraves,項目名稱:forkcms,代碼行數:16,代碼來源:Edit.php

示例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();
 }
開發者ID:WouterSioen,項目名稱:fork-cms-module-team,代碼行數:18,代碼來源:Add.php

示例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);
     }
 }
開發者ID:bwgraves,項目名稱:forkcms,代碼行數:27,代碼來源:Edit.php

示例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);
     }
 }
開發者ID:Brandberries,項目名稱:forkcms-galleria,代碼行數:35,代碼來源:EditAlbum.php

示例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);
 }
開發者ID:Comsa-Veurne,項目名稱:modules,代碼行數:15,代碼來源:Edit.php

示例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);
     }
 }
開發者ID:Comsa-Veurne,項目名稱:modules,代碼行數:15,代碼來源:EditGroup.php

示例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);
 }
開發者ID:bart-webleads,項目名稱:fork-cms-module-slideshow,代碼行數:18,代碼來源:Add.php

示例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'));
 }
開發者ID:bart-webleads,項目名稱:fork-cms-module-slideshow,代碼行數:23,代碼來源:Edit.php

示例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());
 }
開發者ID:Comsa-Veurne,項目名稱:modules,代碼行數:19,代碼來源:Edit.php


注:本文中的Backend\Core\Engine\Model::getURL方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。