本文整理汇总了PHP中WFEditor::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP WFEditor::__construct方法的具体用法?PHP WFEditor::__construct怎么用?PHP WFEditor::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WFEditor
的用法示例。
在下文中一共展示了WFEditor::__construct方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
/**
* Constructor activating the default information of the class
*
* @access public
*/
function __construct($config = array())
{
// Call parent
parent::__construct();
$db = JFactory::getDBO();
// get plugin name
$plugin = JRequest::getCmd('plugin');
// check plugin
if ($this->checkPlugin($plugin)) {
$this->set('name', $plugin);
if (!array_key_exists('type', $config)) {
$config['type'] = 'standard';
}
if (!array_key_exists('base_path', $config)) {
$config['base_path'] = WF_EDITOR_PLUGINS . '/' . $plugin;
}
if (!defined('WF_EDITOR_PLUGIN')) {
define('WF_EDITOR_PLUGIN', $config['base_path']);
}
if (!array_key_exists('view_path', $config)) {
$config['view_path'] = WF_EDITOR_PLUGINS . '/' . $plugin;
}
if (!array_key_exists('layout', $config)) {
$config['layout'] = 'default';
}
if (!array_key_exists('template_path', $config)) {
$config['template_path'] = WF_EDITOR_PLUGIN . '/tmpl';
}
$this->setProperties($config);
} else {
die(JError::raiseError(403, 'RESTRICTED ACCESS'));
}
}
示例2: __construct
/**
* Constructor activating the default information of the class
* @access protected
*/
public function __construct()
{
// Call parent
parent::__construct();
$dialog = JRequest::getWord('dialog');
$theme = JRequest::getWord('theme');
$this->set('dialog', $dialog);
$this->set('theme', $theme);
$this->execute();
}
示例3: define
/**
* Constructor activating the default information of the class
*
* @access public
*/
function __construct()
{
// Call parent
parent::__construct();
$db = JFactory::getDBO();
// get plugin name
$plugin = JRequest::getCmd('plugin');
// check plugin
if ($this->checkPlugin($plugin)) {
$this->set('_name', $plugin);
$this->set('_type', JRequest::getWord('type', 'standard'));
if (!defined('WF_EDITOR_PLUGIN')) {
define('WF_EDITOR_PLUGIN', WF_EDITOR_PLUGINS . DS . $plugin);
}
// set variables for view
$this->set('_layout', 'default');
$this->set('_base_path', WF_EDITOR_PLUGIN);
$this->set('_template_path', WF_EDITOR_PLUGIN . DS . 'tmpl');
} else {
die(JError::raiseError(403, 'RESTRICTED ACCESS'));
}
}
示例4: dirname
/**
* Constructor activating the default information of the class
*
* @access protected
*/
function __construct()
{
// Call parent
parent::__construct();
$db =& JFactory::getDBO();
$plugin = JRequest::getVar('plugin');
if ($plugin) {
if (is_dir(CKE_PLUGINS . DS . $plugin)) {
$this->set('name', $plugin);
$this->set('type', JRequest::getVar('type', 'standard'));
/* if (!defined('CKE_PLUGINS')) {
define('CKE_PLUGINS', CKE_PLUGINS . DS . $plugin);
}*/
// set variables for view
$this->set('layout', 'link');
$this->set('base_path', dirname(__FILE__) . DS . '..' . DS . '..' . DS . 'tmpl' . DS . 'browser' . DS . 'tmpl');
$this->set('template_path', CKE_PLUGINS . DS . 'linkBrowser' . DS . 'tmpl' . DS . 'linkBrowser' . DS . 'tmpl');
}
} else {
die(JError::raiseError(403, JText::_('ERROR_403')));
}
}