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


PHP Model::getURLForBlock方法代碼示例

本文整理匯總了PHP中Backend\Core\Engine\Model::getURLForBlock方法的典型用法代碼示例。如果您正苦於以下問題:PHP Model::getURLForBlock方法的具體用法?PHP Model::getURLForBlock怎麽用?PHP Model::getURLForBlock使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Backend\Core\Engine\Model的用法示例。


在下文中一共展示了Model::getURLForBlock方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: addProductData

 /**
  * Add productdata into the comment
  *
  * @param  string $text The comment.
  * @param string $title The title for the product.
  * @param string $URL The URL for the product.
  * @param int $id The id of the comment.
  * @return string
  */
 public static function addProductData($text, $title, $URL, $id)
 {
     // reset URL
     $URL = BackendModel::getURLForBlock('Catalog', 'Detail') . '/' . $URL . '#comment-' . $id;
     // build HTML
     return '<p><em>' . sprintf(BL::msg('CommentOnWithURL'), $URL, $title) . '</em></p>' . "\n" . (string) $text;
 }
開發者ID:Comsa-Veurne,項目名稱:modules,代碼行數:16,代碼來源:Comments.php

示例2: parse

 /**
  * Parse the form
  */
 protected function parse()
 {
     parent::parse();
     // parse additional variables
     $this->tpl->assign('commentsRSSURL', SITE_URL . BackendModel::getURLForBlock($this->URL->getModule(), 'comments_rss'));
     $this->tpl->assign('isGod', $this->isGod);
 }
開發者ID:forkcms,項目名稱:forkcms,代碼行數:10,代碼來源:Settings.php

示例3: 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

示例4: 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

示例5: 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

示例6: loadForm

 /**
  * Load the form
  */
 private function loadForm()
 {
     // create form
     $this->frm = new BackendForm('editSubscription');
     // create elements
     $this->frm->addText('name', $this->record['name']);
     $this->frm->addText('email', $this->record['email']);
     // assign URL
     $this->tpl->assign('itemURL', BackendModel::getURLForBlock($this->getModule(), 'detail') . '/' . $this->record['agenda_url'] . '#subscription-' . $this->record['agenda_id']);
     $this->tpl->assign('itemTitle', $this->record['agenda_title']);
 }
開發者ID:Comsa-Veurne,項目名稱:modules,代碼行數:14,代碼來源:EditSubscription.php

示例7: 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

示例8: 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

示例9: 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

示例10: 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

示例11: loadForm

 /**
  * Load the form
  */
 private function loadForm()
 {
     // create form
     $this->frm = new BackendForm('editComment');
     // create elements
     $this->frm->addText('author', $this->record['author']);
     $this->frm->addText('email', $this->record['email']);
     $this->frm->addText('website', $this->record['website'], null);
     $this->frm->addTextarea('text', $this->record['text']);
     // assign URL
     $this->tpl->assign('itemURL', BackendModel::getURLForBlock($this->getModule(), 'detail') . '/' . $this->record['post_url'] . '#comment-' . $this->record['post_id']);
     $this->tpl->assign('itemTitle', $this->record['post_title']);
 }
開發者ID:bwgraves,項目名稱:forkcms,代碼行數:16,代碼來源:EditComment.php

示例12: 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

示例13: updateGroup

 /**
  * Updates a list with campaignmonitor and in the database. Returns the affected rows
  *
  * @param array $item The new data.
  * @return int
  */
 public static function updateGroup($item)
 {
     // build unsubscribe link for this list
     $unsubscribeLink = SITE_URL . BackendModel::getURLForBlock('Mailmotor', 'unsubscribe', BL::getWorkingLanguage());
     // update the group with CM
     self::getCM()->updateList($item['name'], $unsubscribeLink . '/?group=' . $item['id'] . '&email=[email]', null, null, self::getCampaignMonitorID('list', $item['id']));
     // check if we have a default group set
     if ($item['is_default'] === 'Y' && $item['language'] != '0') {
         // set all defaults to N
         BackendModel::getContainer()->get('database')->update('mailmotor_groups', array('is_default' => 'N', 'language' => null), 'language = ?', array($item['language']));
     }
     // update the group in our database
     return (int) BackendMailmotorModel::updateGroup($item);
 }
開發者ID:bwgraves,項目名稱:forkcms,代碼行數:20,代碼來源:CMHelper.php

示例14: 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

示例15: getMailingPreviewURL

 /**
  * Get a preview URL to the specific mailing
  *
  * @param int    $id          The id of the mailing.
  * @param string $contentType The content-type, possible values are: html, plain.
  * @param bool   $forCM       Is the URL intended for Campaign Monitor.
  * @return string
  */
 public static function getMailingPreviewURL($id, $contentType = 'html', $forCM = false)
 {
     $contentType = \SpoonFilter::getValue($contentType, array('html', 'plain'), 'html');
     $forCM = \SpoonFilter::getValue($forCM, array(false, true), false, 'int');
     // return the URL
     return SITE_URL . BackendModel::getURLForBlock('Mailmotor', 'Detail') . '/' . $id . '?type=' . $contentType . '&cm=' . $forCM;
 }
開發者ID:newaltcoin,項目名稱:forkcms,代碼行數:15,代碼來源:Model.php


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