本文整理汇总了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;
}
}
示例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'));
}
示例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');
}
示例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'));
}
示例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';
}
}
示例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'];
}
}
示例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));
}
示例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');
}