本文整理汇总了PHP中Gallery::getSettings方法的典型用法代码示例。如果您正苦于以下问题:PHP Gallery::getSettings方法的具体用法?PHP Gallery::getSettings怎么用?PHP Gallery::getSettings使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gallery
的用法示例。
在下文中一共展示了Gallery::getSettings方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSettings
private function getSettings($tree_id, $tag)
{
$key = $tree_id . $tag;
if (array_key_exists($key, $this->settings)) {
return $this->settings[$key];
}
$settingsObj = $this->plugin->getObject(Gallery::TYPE_SETTINGS);
$this->settings[$key] = array_merge($this->plugin->getSettings(), $settingsObj->getSettings($tree_id, $tag));
return $this->settings[$key];
}
示例2: handleConfigGet
/**
* handle tree edit
*/
private function handleConfigGet($retrieveFields = true)
{
$template = new TemplateEngine($this->getPath() . "templates/" . $this->templateFile);
$request = Request::getInstance();
$view = ViewManager::getInstance();
$view->setType(Gallery::VIEW_CONFIG);
$key = $this->getKey();
$fields = array();
if ($retrieveFields) {
if ($this->exists($key)) {
$fields = $this->getDetail($key);
} else {
$fields = array_merge($this->getFields(SqlParser::MOD_INSERT), $this->plugin->getSettings());
}
} else {
$fields = $this->getFields(SqlParser::MOD_UPDATE);
}
$template->setVariable('cbo_display', Utils::getHtmlCombo(Gallery::getDisplayTypeList(), $fields['display']));
$template->setVariable('cbo_display_overview', Utils::getHtmlCombo(Gallery::getDisplayOverviewList(), $fields['display_overview']));
$template->setVariable('cbo_comment_display', Utils::getHtmlCombo(GalleryComment::getDisplayTypeList(), $fields['comment_display']));
$this->setFields($fields);
$template->setVariable($fields);
$template->setVariable($key);
// add source code editor
$theme = $this->director->theme;
$theme->addHeader('<script type="text/javascript" src="' . DIF_VIRTUAL_WEB_ROOT . 'js/editarea/edit_area/edit_area_full.js"></script>');
$theme->addJavascript('
editAreaLoader.init({ id: "area1",
start_highlight: true,
allow_toggle: true,
allow_resize: true,
language: "en",
syntax: "php",
syntax_selection_allow: "css,html,js,php",
});
');
// add breadcrumb item
$this->director->theme->handleAdminLinks($template);
$this->template[$this->director->theme->getConfig()->main_tag] = $template;
}