本文整理汇总了PHP中EB::jconfig方法的典型用法代码示例。如果您正苦于以下问题:PHP EB::jconfig方法的具体用法?PHP EB::jconfig怎么用?PHP EB::jconfig使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EB
的用法示例。
在下文中一共展示了EB::jconfig方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
// EasyBlog's configuration
$this->config = EB::config();
$this->jconfig = EB::jconfig();
// Joomla's document object
$this->doc = JFactory::getDocument();
// Joomla's application object
$this->app = JFactory::getApplication();
// Request input object
$this->input = EB::request();
// Current logged in user.
$this->my = JFactory::getUser();
// String library
$this->string = EB::string();
$this->lang = JFactory::getLanguage();
}
示例2: display
public function display($tpl = null)
{
if (!$this->config->get('main_remotepublishing_xmlrpc')) {
return;
}
$theme = EB::template();
// Get the site details
$title = EB::jconfig()->get('sitename');
$link = rtrim(JURI::root(), '/') . '/index.php?option=com_easyblog&tmpl=component';
$xmlrpc = rtrim(JURI::root(), '/') . '/index.php?option=com_easyblog&view=xmlrpc&tmpl=component';
$theme->set('title', $title);
$theme->set('link', $link);
$theme->set('xmlrpc', $xmlrpc);
$output = $theme->output('site/rsd/template');
header('Content-Type: application/xml; charset=utf-8', true);
echo $output;
exit;
}
示例3: __construct
public function __construct()
{
$this->doc = JFactory::getDocument();
$this->app = JFactory::getApplication();
$this->my = JFactory::getUser();
$this->config = EB::config();
$this->info = EB::info();
$this->jconfig = EB::jconfig();
$this->acl = EB::acl();
// If this is a dashboard theme, we need to let the theme object know
$options = array('paramsPrefix' => $this->paramsPrefix);
// If this is an ajax document, we should pass the $ajax library to the client
if ($this->doc->getType() == 'ajax') {
//we need to load frontend language from here incase it was called from backend.
JFactory::getLanguage()->load('com_easyblog', JPATH_ROOT);
$this->ajax = EB::ajax();
}
// Create an instance of the theme so child can start setting variables to it.
$this->theme = EB::template(null, $options);
// Set the input object
$this->input = EB::request();
}
示例4: display
/**
* Override parent's display method
*
* @since 4.0
* @access public
* @param string
* @return
*/
public function display($cachable = false, $urlparams = array())
{
$viewType = $this->doc->getType();
$viewName = $this->input->get('view', 'latest');
$viewLayout = $this->input->get('layout', 'default', 'string');
// Get the view
$view = $this->getView($viewName, $viewType, '', array('base_path' => $this->basePath, 'layout' => $viewLayout));
// Set the layout
$view->setLayout($viewLayout);
// Get Joomla's configuration
$jconfig = EB::jconfig();
// Display the view
if ($cachable && $viewType != 'feed' && $jconfig->get('caching') >= 1) {
$option = $this->input->get('option');
$cache = JFactory::getCache($option, 'view');
if (is_array($urlparams)) {
if (!empty($this->app->registeredurlparams)) {
$registeredurlparams = $app->registeredurlparams;
} else {
$registeredurlparams = new stdClass();
}
foreach ($urlparams as $key => $value) {
// Add your safe url parameters with variable type as value {@see JFilterInput::clean()}.
$registeredurlparams->{$key} = $value;
}
$app->registeredurlparams = $registeredurlparams;
}
$cache->get($view, 'display');
} else {
if (method_exists($view, $viewLayout)) {
$view->{$viewLayout}();
} else {
$view->display();
}
}
return $this;
}
示例5: getCache
/**
* Retrieves Joomla's cache object
*
* @since 4.0
* @access public
* @param string
* @return
*/
public static function getCache()
{
$jconfig = EB::jconfig();
$options = array('defaultgroup' => '', 'storage' => $jconfig->get('cache_handler', ''), 'caching' => true, 'cachebase' => $jconfig->get('cache_path', JPATH_SITE . '/cache'));
$cache = JCache::getInstance('', $options);
return $cache;
}