当前位置: 首页>>代码示例>>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;未经允许,请勿转载。