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


PHP FrontendModel::getModuleSettings方法代碼示例

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


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

示例1: getData

 /**
  * Load the data, don't forget to validate the incoming data
  */
 private function getData()
 {
     // validate incoming parameters
     if ($this->URL->getParameter(1) === null) {
         $this->redirect(FrontendNavigation::getURL(404));
     }
     // load revision
     if ($this->URL->getParameter('revision', 'int') != 0) {
         // get data
         $this->record = FrontendBlogModel::getRevision($this->URL->getParameter(1), $this->URL->getParameter('revision', 'int'));
         // add no-index, so the draft won't get accidentally indexed
         $this->header->addMetaData(array('name' => 'robots', 'content' => 'noindex, nofollow'), true);
     } else {
         $this->record = FrontendBlogModel::get($this->URL->getParameter(1));
     }
     // anything found?
     if (empty($this->record)) {
         $this->redirect(FrontendNavigation::getURL(404));
     }
     // get comments
     $this->comments = FrontendBlogModel::getComments($this->record['id']);
     // get tags
     $this->record['tags'] = FrontendTagsModel::getForItem('blog', $this->record['id']);
     // get settings
     $this->settings = FrontendModel::getModuleSettings('blog');
     // overwrite URLs
     $this->record['category_full_url'] = FrontendNavigation::getURLForBlock('blog', 'category') . '/' . $this->record['category_url'];
     $this->record['full_url'] = FrontendNavigation::getURLForBlock('blog', 'detail') . '/' . $this->record['url'];
     $this->record['allow_comments'] = $this->record['allow_comments'] == 'Y';
     $this->record['comments_count'] = count($this->comments);
     // reset allow comments
     if (!$this->settings['allow_comments']) {
         $this->record['allow_comments'] = false;
     }
 }
開發者ID:naujasdizainas,項目名稱:forkcms,代碼行數:38,代碼來源:detail.php

示例2: parse

 /**
  * Parse the data into the template
  */
 private function parse()
 {
     // show message
     $this->tpl->assign('locationItems', FrontendLocationModel::getAll());
     // hide form
     $this->tpl->assign('locationSettings', FrontendModel::getModuleSettings('location'));
 }
開發者ID:naujasdizainas,項目名稱:forkcms,代碼行數:10,代碼來源:index.php

示例3: getData

 /**
  * Load the data, don't forget to validate the incoming data
  *
  * @return	void
  */
 private function getData()
 {
     // get articles
     $this->items = FrontendBlogModel::getAll(30);
     // get settings
     $this->settings = FrontendModel::getModuleSettings('blog');
 }
開發者ID:netconstructor,項目名稱:forkcms,代碼行數:12,代碼來源:rss.php

示例4: parse

 /**
  * Parse the data into the template
  */
 private function parse()
 {
     // show message
     $this->tpl->assign('widgetLocationItems', FrontendLocationModel::get((int) $this->data['id']));
     // hide form
     $this->tpl->assign('widgetLocationSettings', FrontendModel::getModuleSettings('location'));
 }
開發者ID:naujasdizainas,項目名稱:forkcms,代碼行數:10,代碼來源:location.php

示例5: getData

 /**
  * Load the data, don't forget to validate the incoming data
  */
 private function getData()
 {
     // validate incoming parameters
     if ($this->URL->getParameter(1) === null) {
         $this->redirect(FrontendNavigation::getURL(404));
     }
     // get by URL
     $this->record = FrontendFaqModel::get($this->URL->getParameter(1));
     // anything found?
     if (empty($this->record)) {
         $this->redirect(FrontendNavigation::getURL(404));
     }
     // overwrite URLs
     $this->record['category_full_url'] = FrontendNavigation::getURLForBlock('faq', 'category') . '/' . $this->record['category_url'];
     $this->record['full_url'] = FrontendNavigation::getURLForBlock('faq', 'detail') . '/' . $this->record['url'];
     // get tags
     $this->record['tags'] = FrontendTagsModel::getForItem('faq', $this->record['id']);
     // get settings
     $this->settings = FrontendModel::getModuleSettings('faq');
     // reset allow comments
     if (!$this->settings['allow_feedback']) {
         $this->record['allow_feedback'] = false;
     }
     // ge status
     $this->status = $this->URL->getParameter(2);
     if ($this->status == FL::getAction('Success')) {
         $this->status = 'success';
     }
     if ($this->status == FL::getAction('Spam')) {
         $this->status = 'spam';
     }
 }
開發者ID:naujasdizainas,項目名稱:forkcms,代碼行數:35,代碼來源:detail.php

示例6: loadData

 /**
  * Load the data
  */
 protected function loadData()
 {
     $this->items = FrontendLocationModel::getAll();
     $this->settings = FrontendLocationModel::getMapSettings(0);
     $firstMarker = current($this->items);
     if (empty($this->settings)) {
         $this->settings = FrontendModel::getModuleSettings('location');
         $this->settings['center']['lat'] = $firstMarker['lat'];
         $this->settings['center']['lng'] = $firstMarker['lng'];
     }
     // no center point given yet, use the first occurance
     if (!isset($this->settings['center'])) {
         $this->settings['center']['lat'] = $firstMarker['lat'];
         $this->settings['center']['lng'] = $firstMarker['lng'];
     }
 }
開發者ID:nickmancol,項目名稱:forkcms-rhcloud,代碼行數:19,代碼來源:index.php

示例7: loadData

 /**
  * Load the data
  */
 protected function loadData()
 {
     $this->items = FrontendLocationModel::get($this->data['id']);
     $this->settings = FrontendLocationModel::getMapSettings($this->data['id']);
     if (empty($this->settings)) {
         $settings = FrontendModel::getModuleSettings('location');
         $this->settings['width'] = $settings['width_widget'];
         $this->settings['height'] = $settings['height_widget'];
         $this->settings['map_type'] = $settings['map_type_widget'];
         $this->settings['zoom_level'] = $settings['zoom_level_widget'];
         $this->settings['center']['lat'] = $this->items['lat'];
         $this->settings['center']['lng'] = $this->items['lng'];
     }
     // no center point given yet, use the first occurance
     if (!isset($this->settings['center'])) {
         $this->settings['center']['lat'] = $this->items['lat'];
         $this->settings['center']['lng'] = $this->items['lng'];
     }
     $this->settings['maps_url'] = FrontendLocationModel::buildUrl($this->settings, array($this->items));
 }
開發者ID:nickmancol,項目名稱:forkcms-rhcloud,代碼行數:23,代碼來源:location.php

示例8: getData

 /**
  * Load the data, don't forget to validate the incoming data
  */
 private function getData()
 {
     $this->items = FrontendBlogModel::getAll(30);
     $this->settings = FrontendModel::getModuleSettings('blog');
 }
開發者ID:naujasdizainas,項目名稱:forkcms,代碼行數:8,代碼來源:rss.php


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