本文整理匯總了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')));
}
}