本文整理汇总了PHP中JModelForm::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP JModelForm::__construct方法的具体用法?PHP JModelForm::__construct怎么用?PHP JModelForm::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JModelForm
的用法示例。
在下文中一共展示了JModelForm::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor.
*
* @param array $config An optional associative array of configuration settings.
*
* @see JModelLegacy
* @since 12.2
*/
public function __construct($config = array())
{
parent::__construct($config);
if (isset($config['event_after_delete'])) {
$this->event_after_delete = $config['event_after_delete'];
} elseif (empty($this->event_after_delete)) {
$this->event_after_delete = 'onContentAfterDelete';
}
if (isset($config['event_after_save'])) {
$this->event_after_save = $config['event_after_save'];
} elseif (empty($this->event_after_save)) {
$this->event_after_save = 'onContentAfterSave';
}
if (isset($config['event_before_delete'])) {
$this->event_before_delete = $config['event_before_delete'];
} elseif (empty($this->event_before_delete)) {
$this->event_before_delete = 'onContentBeforeDelete';
}
if (isset($config['event_before_save'])) {
$this->event_before_save = $config['event_before_save'];
} elseif (empty($this->event_before_save)) {
$this->event_before_save = 'onContentBeforeSave';
}
if (isset($config['event_change_state'])) {
$this->event_change_state = $config['event_change_state'];
} elseif (empty($this->event_change_state)) {
$this->event_change_state = 'onContentChangeState';
}
// Guess the JText message prefix. Defaults to the option.
if (isset($config['text_prefix'])) {
$this->text_prefix = strtoupper($config['text_prefix']);
} elseif (empty($this->text_prefix)) {
$this->text_prefix = strtoupper($this->option);
}
}
示例2:
function __construct()
{
parent::__construct();
$this->projectid = JRequest::getInt('p', 0);
$this->ptid = JRequest::getInt('ptid', 0);
$this->tid = JRequest::getInt('tid', 0);
}
示例3: __construct
public function __construct($config = array())
{
$udbPath = UserNotesHelper::userDataPath() . '/usernotes.db3';
$db = JDatabaseDriver::getInstance(array('driver' => 'sqlite', 'database' => $udbPath));
$config['dbo'] = $db;
parent::__construct($config);
}
示例4: __construct
/**
* Constructor
*
* @param array $config An array of configuration options (name, state, dbo, table_path, ignore_request).
*
* @since 3.2
*
* @throws Exception
*/
public function __construct($config = array())
{
$config = array_merge(array('events_map' => array('validate' => 'user')), $config);
parent::__construct($config);
// Load the helper and model used for two factor authentication
JLoader::register('UsersModelUser', JPATH_ADMINISTRATOR . '/components/com_users/models/user.php');
JLoader::register('UsersHelper', JPATH_ADMINISTRATOR . '/components/com_users/helpers/users.php');
}
示例5: __construct
public function __construct($config = array())
{
parent::__construct($config);
global $ext_name_com, $ext_prefix;
$this->ext_name_com = $ext_name_com;
$this->ext_prefix = $ext_prefix;
$this->context .= $this->getName() && ($layout = JRequest::getVar('layout', 'default')) ? '.' . $layout : '';
$this->params = JComponentHelper::getParams($this->ext_name_com);
}
示例6: __construct
public function __construct($config = array())
{
parent::__construct($config);
// Load the Joomla! RAD layer
if (!defined('FOF_INCLUDED')) {
include_once JPATH_LIBRARIES . '/fof/include.php';
}
// Load the helper and model used for two factor authentication
require_once JPATH_ADMINISTRATOR . '/components/com_users/models/user.php';
require_once JPATH_ADMINISTRATOR . '/components/com_users/helpers/users.php';
}
示例7: __construct
public function __construct($config)
{
parent::__construct($config);
// Чтение username из таблицы User
$user =& JFactory::getUser();
$this->username = $user->get('id');
if ($this->username == null) {
$this->username = 0;
}
// Возвращаем ссылку на глобальный объект базы данных
$this->db = $this->getDBO();
if (!$this->db->connected()) {
echo "Нет соединения с сервером баз данных. Повторите запрос позже";
jexit();
}
### for test only
//$this->username = 6334;
}
示例8: stdClass
function __construct()
{
parent::__construct();
$usersConfig = JComponentHelper::getParams('com_fabrik');
$id = JRequest::getInt('listid', $usersConfig->get('listid'));
$this->packageId = (int) JRequest::getInt('packageid', $usersConfig->get('packageid'));
$this->setId($id);
$this->_access = new stdClass();
}
示例9: getInput
public function getInput()
{
parent::__construct();
}
示例10: __construct
/**
* Constructor
*
* @param array $config An array of configuration options (name, state, dbo, table_path, ignore_request).
*
* @since 3.6
*
* @throws Exception
*/
public function __construct($config = array())
{
$config = array_merge(array('events_map' => array('validate' => 'user')), $config);
parent::__construct($config);
}
示例11: __construct
/**
* Constructor
*
* @param array $config DI Config options
*/
public function __construct($config = array())
{
parent::__construct();
$usersConfig = JComponentHelper::getParams('com_fabrik');
$this->app = ArrayHelper::getValue($config, 'app', JFactory::getApplication());
$this->session = ArrayHelper::getValue($config, 'session', JFactory::getSession());
$this->user = ArrayHelper::getValue($config, 'user', JFactory::getUser());
$this->config = ArrayHelper::getValue($config, 'config', JFactory::getConfig());
$this->lang = ArrayHelper::getValue($config, 'lang', JFactory::getLanguage());
$input = $this->app->input;
$id = $input->getInt('listid', $usersConfig->get('listid'));
$this->packageId = (int) $input->getInt('packageId', $usersConfig->get('packageId'));
$this->setId($id);
$this->advancedSearch = JModelLegacy::getInstance('AdvancedSearch', 'FabrikFEModel');
$this->advancedSearch->setModel($this);
$this->access = new stdClass();
}
示例12:
function __construct()
{
parent::__construct();
}
示例13: __construct
public function __construct($config = array())
{
parent::__construct($config);
}
示例14: __construct
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$usersConfig = JComponentHelper::getParams('com_fabrik');
$app = JFactory::getApplication();
$input = $app->input;
$id = $input->getInt('listid', $usersConfig->get('listid'));
$this->packageId = (int) $input->getInt('packageId', $usersConfig->get('packageId'));
$this->setId($id);
$this->access = new stdClass();
}
示例15: __construct
/**
* Class contructor
*
* @access public
* @return Object&
*/
public function __construct($config = array())
{
parent::__construct($config);
// App reference
$this->app = JFactory::getApplication();
}