本文整理汇总了PHP中JModel::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP JModel::__construct方法的具体用法?PHP JModel::__construct怎么用?PHP JModel::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JModel
的用法示例。
在下文中一共展示了JModel::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
/**
* Constructor
*
* @since 1.5
*/
function __construct()
{
parent::__construct();
$usersConfig =& JComponentHelper::getParams('com_fabrik');
$id = JRequest::getInt('fabrik', $usersConfig->get('fabrik'));
$this->setId($id);
}
示例2:
/**
* Constructor that retrieves the ID from the request
*
* @access public
* @return void
*/
function __construct()
{
parent::__construct();
$id = JRequest::getVar('cid', 0, '', 'int');
$this->setId($id);
}
示例3: array
function __construct()
{
parent::__construct();
$this->_data = array();
jimport('joomla.filesystem.file');
require_once JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . 'com_jdefender' . DS . 'helpers' . DS . 'vars.php';
}
示例4:
function __construct()
{
parent::__construct();
global $option;
$id = JRequest::getInt('feed_id', 0, '', 'int');
$this->setId((int) $id);
}
示例5: array
/**
* Constructor
*
* @since 0.1
*/
function __construct()
{
parent::__construct();
$array = JRequest::getVar('cid', array(0), '', 'array');
$this->setId((int) $array[0]);
$this->setSubmitKey(JRequest::getVar('submit_key', ''));
}
示例6:
function __construct()
{
parent::__construct();
$this->_cid = JRequest::getInt('catid', 0);
$this->_size = JRequest::getVar('size', '');
$this->_id = JRequest::getVar('id', '');
}
示例7: floor
function __construct()
{
parent::__construct();
$mainframe =& JFactory::getApplication();
$option = 'com_rsticketspro';
$user = JFactory::getUser();
if ($user->get('guest')) {
$link = JRequest::getURI();
$link = base64_encode($link);
$user_option = RSTicketsProHelper::isJ16() ? 'com_users' : 'com_user';
$mainframe->redirect(RSTicketsProHelper::route('index.php?option=' . $user_option . '&view=login&return=' . $link, false));
}
if (!RSTicketsProHelper::isStaff()) {
JError::raiseWarning(500, JText::_('RST_STAFF_CANNOT_VIEW_USERS'));
$mainframe->redirect(RSTicketsProHelper::route('index.php?option=com_rsticketspro&view=rsticketspro', false));
}
$this->_permissions = RSTicketsProHelper::getCurrentPermissions();
if (!$this->_permissions->add_ticket_customers && !$this->_permissions->add_ticket_staff) {
JError::raiseWarning(500, JText::_('RST_STAFF_CANNOT_VIEW_USERS'));
$mainframe->redirect(RSTicketsProHelper::route('index.php?option=com_rsticketspro&view=rsticketspro', false));
}
$this->_db = JFactory::getDBO();
// Get pagination request variables
$limit = JRequest::getVar('limit', $mainframe->getCfg('list_limit'), '', 'int');
$limitstart = JRequest::getVar('limitstart', 0, '', 'int');
// In case limit has been changed, adjust it
$limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0;
$this->setState($option . '.users.limit', $limit);
$this->setState($option . '.users.limitstart', $limitstart);
$this->_query = $this->_buildQuery();
}
示例8:
function __construct()
{
parent::__construct();
$this->turnierid = JRequest::getInt('turnier', 0);
$this->_getTurnierData();
$this->_getTurnierPlayers();
}
示例9: YRMModelVersion
function YRMModelVersion($lists)
{
$this->_version = $lists['version'];
$this->_url = $lists['url'];
$this->_pc = $lists['pc'];
parent::__construct();
}
示例10: floor
function __construct()
{
parent::__construct();
$mainframe =& JFactory::getApplication();
$option = 'com_rsmembership';
// Get pagination request variables
$limit = JRequest::getVar('limit', $mainframe->getCfg('list_limit'), '', 'int');
$limitstart = JRequest::getVar('limitstart', 0, '', 'int');
// In case limit has been changed, adjust it
$limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0;
$this->setState($option . '.categories.limit', $limit);
$this->setState($option . '.categories.limitstart', $limitstart);
$params = clone $mainframe->getParams('com_rsmembership');
switch ($params->get('orderby')) {
case 'title':
$sortColumn = 'c.name';
$sortOrder = 'ASC';
break;
case 'rtitle':
$sortColumn = 'c.name';
$sortOrder = 'DESC';
break;
default:
case 'order':
$sortColumn = 'c.ordering';
$sortOrder = 'ASC';
break;
}
$filter_order = $mainframe->getUserStateFromRequest($option . '.categories.filter_order', 'filter_order', $sortColumn);
$filter_order_Dir = $mainframe->getUserStateFromRequest($option . '.categories.filter_order_Dir', 'filter_order_Dir', $sortOrder);
$this->setState($option . '.categories.filter_order', $filter_order);
$this->setState($option . '.categories.filter_order_Dir', $filter_order_Dir);
$this->_query = $this->_buildQuery();
}
示例11:
/**
* Constructor that retrieves the ID from the request
*
* @access public
* @return void
*/
function __construct()
{
parent::__construct();
//dump(JRequest::getVar('cid'), "CID");
$array = JRequest::getVar('cid', 0, '', 'array');
$this->setId((int) $array[0]);
}
示例12:
function __construct()
{
parent::__construct();
$array = JRequest::getVar('cid', 0, '', 'array');
$this->setId((int) $array[0]);
$this->_params =& JComponentHelper::getParams('com_ecommerce');
}
示例13: switch
/**
* Constructor
*
* @since 1.5
*/
function __construct()
{
global $mainframe;
parent::__construct();
$_task = JRequest::getVar('task', 'time');
$_time = JRequest::getVar('time', '24h');
switch ($_time) {
case "4h":
$this->_hours = 4;
break;
case "8h":
$this->_hours = 8;
break;
case "12h":
$this->_hours = 12;
break;
case "24h":
$this->_hours = 24;
break;
default:
$this->_hours = 24;
break;
}
// get parameters
$params = JComponentHelper::getParams('com_discussions');
$_categoryListLength = $params->get('categoryListLength', '20');
$this->setState('limit', $_categoryListLength, 'int');
$this->setState('limitstart', JRequest::getVar('limitstart', 0, '', 'int'));
}
示例14: JParameter
function __construct()
{
parent::__construct();
global $mainframe, $option;
$component = JComponentHelper::getComponent('com_properties');
$params = new JParameter($component->params);
$this->Mostrar = $params->get('cantidad_productos');
if (!JRequest::getVar('limitstart')) {
$this->setState('limit', $this->Mostrar);
$this->setState('limitstart', 0);
} else {
$limit = $this->Mostrar;
$this->setState('limit', $this->Mostrar);
$limitstart = JRequest::getVar('limitstart');
$this->setState('limitstart', $limitstart);
$start = JRequest::getVar('start');
$this->setState('start', $start);
}
$ShowOrderByDefault = $params->get('ShowOrderByDefault');
$ShowOrderDefault = $params->get('ShowOrderDefault');
$this->filter_order = $mainframe->getUserStateFromRequest("{$option}.filter_order", 'filter_order', $ShowOrderByDefault, 'cmd');
$this->filter_order_Dir = $mainframe->getUserStateFromRequest("{$option}.filter_order_Dir", 'filter_order_Dir', $ShowOrderDefault, 'word');
$menus =& JSite::getMenu();
$menu = $menus->getActive();
$menu_params = new JParameter($menu->params);
$DetailsMarket = $menu_params->get('DetailsMarket');
$this->DetailsMarket = $DetailsMarket;
$this->pathway();
}
示例15:
function __construct()
{
parent::__construct();
$this->_language = JRequest::getVar('language', 'en-GB');
$this->_db = JFactory::getDBO();
$this->_query = $this->_buildQuery();
}