当前位置: 首页>>代码示例>>PHP>>正文


PHP JModelLegacy::__construct方法代码示例

本文整理汇总了PHP中JModelLegacy::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP JModelLegacy::__construct方法的具体用法?PHP JModelLegacy::__construct怎么用?PHP JModelLegacy::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JModelLegacy的用法示例。


在下文中一共展示了JModelLegacy::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

	function __construct() {
		
		$app	= JFactory::getApplication();
		
		parent::__construct();
		
		$config = JFactory::getConfig();		
		
		$paramsC 			= JComponentHelper::getParams('com_phocadownload') ;
		$defaultPagination	= $paramsC->get( 'default_pagination', '20' );
		$file_ordering		= $paramsC->get( 'file_ordering', 1 );
		$context			= $this->_context.'.';
		
		// Get the pagination request variables
		$this->setState('limit', $app->getUserStateFromRequest($context.'limit', 'limit', $defaultPagination, 'int'));
		$this->setState('limitstart', $app->input->get('limitstart', 0, 'int'));

		// In case limit has been changed, adjust limitstart accordingly
		$this->setState('limitstart', ($this->getState('limit') != 0 ? (floor($this->getState('limitstart') / $this->getState('limit')) * $this->getState('limit')) : 0));
		
		$this->setState('filter.language',$app->getLanguageFilter());
		
		$this->setState('fileordering', $app->getUserStateFromRequest($context .'fileordering', 'fileordering', $file_ordering, 'int'));

		// Get the filter request variables
		$this->setState('filter_order', JRequest::getCmd('filter_order', 'ordering'));
		$this->setState('filter_order_dir', JRequest::getCmd('filter_order_Dir', 'ASC'));
		
	}
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:29,代码来源:category.php

示例2: floor

 /**
  * Constructor
  *
  * @since 1.0
  */
 function __construct()
 {
     parent::__construct();
     $app = JFactory::getApplication();
     $option = JRequest::getVar('option');
     $cparams = JComponentHelper::getParams('com_flexicontent');
     $default_order = $cparams->get('items_manager_order', 'i.ordering');
     $default_order_dir = $cparams->get('items_manager_order_dir', 'ASC');
     $filter_order_type = $app->getUserStateFromRequest($option . '.items.filter_order_type', 'filter_order_type', 1, 'int');
     $filter_order = $app->getUserStateFromRequest($option . '.items.filter_order', 'filter_order', $default_order, 'cmd');
     $filter_order_Dir = $app->getUserStateFromRequest($option . '.items.filter_order_Dir', 'filter_order_Dir', $default_order_dir, 'word');
     // Filter order is selected via current setting of filter_order_type selector
     $filter_order = $filter_order_type && $filter_order == 'i.ordering' ? 'catsordering' : $filter_order;
     $filter_order = !$filter_order_type && $filter_order == 'catsordering' ? 'i.ordering' : $filter_order;
     JRequest::setVar('filter_order', $filter_order);
     JRequest::setVar('filter_order_Dir', $filter_order_Dir);
     $filter_cats = $app->getUserStateFromRequest($option . '.items.filter_cats', 'filter_cats', '', 'int');
     $filter_subcats = $app->getUserStateFromRequest($option . '.items.filter_subcats', 'filter_subcats', 1, 'int');
     if ($filter_order_type && $filter_cats && ($filter_order == 'i.ordering' || $filter_order == 'catsordering')) {
         JRequest::setVar('filter_subcats', 0);
     }
     $limit = $app->getUserStateFromRequest($option . '.items.limit', 'limit', $app->getCfg('list_limit'), 'int');
     $limitstart = $app->getUserStateFromRequest($option . '.items.limitstart', 'limitstart', 0, 'int');
     // In case limit has been changed, adjust limitstart accordingly
     $limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0;
     $this->setState('limit', $limit);
     $this->setState('limitstart', $limitstart);
     $array = JRequest::getVar('cid', 0, '', 'array');
     $this->setId((int) $array[0]);
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:35,代码来源:items.php

示例3: __construct

 /**
  * Constructor
  *
  * @param   array  $config  An array of configuration options (name, state, dbo, table_path, ignore_request).
  *
  * @since   11.1
  */
 public function __construct($config = array())
 {
     $this->pathBase = JPATH_SITE . '/plugins/fabrik_visualization/';
     // 3.0 compat
     $this->_row =& $this->row;
     parent::__construct($config);
 }
开发者ID:ankaau,项目名称:GathBandhan,代码行数:14,代码来源:visualization.php

示例4:

 function __construct()
 {
     $this->context = APP_EXTENSION . "_fields.";
     $this->_tablename = '#__' . APP_PREFIX . '_fields';
     $this->_tablename_category = '#__' . APP_PREFIX . '_fields_categories';
     parent::__construct();
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:7,代码来源:fields.php

示例5: __construct

 /**
  * Constructor.
  *
  * @param   array  $config  An optional associative array of configuration settings.
  *
  * @see     JController
  * @since   1.6
  */
 public function __construct($config = array())
 {
     if (empty($config['filter_fields'])) {
         $config['filter_fields'] = array('id', 'name', 'relname');
     }
     parent::__construct($config);
 }
开发者ID:Caojunkai,项目名称:arcticfox,代码行数:15,代码来源:files.php

示例6: __construct

 /**
  * Constructor
  *
  * @param   array  $config  An array of configuration options (name, state, dbo, table_path, ignore_request).
  *
  * @since   12.2
  * @throws  Exception
  */
 public function __construct($config = [])
 {
     if (empty($config['filter_fields'])) {
         $config['filter_fields'] = ['id', 'a.id', 'name', 'a.name', 'lname', 'a.lname', 'suburb', 'a.suburb', 'state', 'a.state', 'country', 'a.country', 'ordering', 'a.ordering', 'sortname1', 'a.sortname1', 'sortname2', 'a.sortname2', 'sortname3', 'a.sortname3'];
     }
     parent::__construct($config);
 }
开发者ID:Joomla-Bible-Study,项目名称:joomla_churchdirectory,代码行数:15,代码来源:reports.php

示例7: array

 function __construct()
 {
     $app = JFactory::getApplication();
     $this->_member_id = $app->input->get('member_id', null);
     $config['filter_fields'] = array('b.lastname');
     parent::__construct($config);
 }
开发者ID:gorgozilla,项目名称:Estivole,代码行数:7,代码来源:members.php

示例8: floor

 /**
  * Constructor
  *
  * @since 1.0
  */
 function __construct()
 {
     parent::__construct();
     $app = JFactory::getApplication();
     $jinput = $app->input;
     $option = $jinput->get('option', '', 'cmd');
     $view = $jinput->get('view', '', 'cmd');
     $fcform = $jinput->get('fcform', 0, 'int');
     $p = $option . '.' . $view . '.';
     // *****************************
     // Pagination: limit, limitstart
     // *****************************
     $limit = $fcform ? $jinput->get('limit', $app->getCfg('list_limit'), 'int') : $app->getUserStateFromRequest($p . 'limit', 'limit', $app->getCfg('list_limit'), 'int');
     $limitstart = $fcform ? $jinput->get('limitstart', 0, 'int') : $app->getUserStateFromRequest($p . 'limitstart', 'limitstart', 0, 'int');
     // In case limit has been changed, adjust limitstart accordingly
     $limitstart = $limit != 0 ? floor($limitstart / $limit) * $limit : 0;
     $jinput->set('limitstart', $limitstart);
     $this->setState('limit', $limit);
     $this->setState('limitstart', $limitstart);
     $app->setUserState($p . 'limit', $limit);
     $app->setUserState($p . 'limitstart', $limitstart);
     // For some model function that use single id
     $array = $jinput->get('cid', array(0), 'array');
     $this->setId((int) $array[0]);
 }
开发者ID:nettdotkomm,项目名称:flexicontent-cck,代码行数:30,代码来源:tags.php

示例9: __construct

 /**
  * Constructor.
  *
  * @param	array	An optional associative array of configuration settings.
  * @see		JController
  * @since	1.6
  */
 public function __construct($config = array())
 {
     if (empty($config['filter_fields'])) {
         $config['filter_fields'] = array('name', 'client_id', 'type', 'folder', 'extension_id', 'update_id', 'update_site_id', 'update_site');
     }
     parent::__construct($config);
 }
开发者ID:networksoft,项目名称:seekerplus2.com,代码行数:14,代码来源:install.php

示例10:

 function __construct()
 {
     parent::__construct();
     // Mannschafts-Nummer fuer update
     // ...
     // $db_man_nr  = ...
 }
开发者ID:kbaerthel,项目名称:com_clm,代码行数:7,代码来源:swtligaman.php

示例11: __construct

 public function __construct()
 {
     parent::__construct();
     $app = JFactory::getApplication();
     $jinput = $app->input;
     $this->projectid = JLHelperFront::stringToInt($jinput->getInt('p', 0));
 }
开发者ID:hfmprs,项目名称:JoomLeague,代码行数:7,代码来源:project.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     $this->db = JFactory::getDBO();
     $this->app = JFactory::getApplication();
     $this->config = JFactory::getConfig();
 }
开发者ID:Tfrez,项目名称:jVarcade,代码行数:7,代码来源:install.php

示例13:

 function __construct()
 {
     parent::__construct();
     global $mainframe, $option;
     $mainframe = JFactory::getApplication();
     $jinput = $mainframe->input;
     //CATEGORY FILTER store_cat
     //$store_cat = $mainframe->getUserStateFromRequest( 'com_quick2cart.store_cat', 'store_cat',0, 'INTEGER' );
     $store_cat = $jinput->get('store_cat', '', 'INTEGER');
     $this->setState('store_cat', $store_cat);
     // get component limit for pagination
     $params = JComponentHelper::getParams('com_quick2cart');
     if (!empty($store_cat)) {
         // show pagination only when pagination is selected
         $comp_limit = $params->get('all_prod_pagination_limit');
     } else {
         $comp_limit = $params->get('storeProdPage_limit');
     }
     //$filter_limit=$mainframe->getCfg('list_limit');
     //$filter_limit=!empty($default_limit)?$default_limit:$comp_limit;
     // Get the pagination request variables
     $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $comp_limit, 'int');
     $limitstart = $jinput->get('limitstart', 0, '', 'int');
     $this->setState('limit', $limit);
     // Set the limit variable for query later on
     $this->setState('limitstart', $limitstart);
     //$change_storeto= $mainframe->getUserStateFromRequest( 'current_store', 'current_store','', 'INTEGER' );
     //$this->setState('current_store', $change_storeto);
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:29,代码来源:store.php

示例14: __construct

	/**
	 * Constructor
	 */
	public function __construct()
	{
		parent::__construct();

		$app = JFactory::getApplication();

		// Get the parameters of the active menu item
		$params = $app->getParams('com_jem');

		$id = $app->input->getInt('id', 0);
		if (empty($id)) {
			$id = $params->get('id', 1);
		}

		$this->_id = $id;

		$this->_showemptycats    = (bool)$params->get('showemptycats', 1);
		$this->_showsubcats      = (bool)$params->get('usecat', 1);
		$this->_showemptysubcats = (bool)$params->get('showemptychilds', 1);

		//get the number of events from database
		$limit 		= $app->input->getInt('limit', $params->get('cat_num'));
		$limitstart = $app->input->getInt('limitstart', 0);
		// correct start value if required
		$limitstart = $limit ? (int)(floor($limitstart / $limit) * $limit) : 0;

		$this->setState('limit', $limit);
		$this->setState('limitstart', $limitstart);
	}
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:32,代码来源:categories.php

示例15:

 /**
  * Constructor
  *
  * @since 1.0
  */
 function __construct()
 {
     parent::__construct();
     $type = JRequest::getVar('type', 'items', '', 'word');
     $folder = JRequest::getVar('folder', 'default', '', 'cmd');
     $this->setId($type, $folder);
 }
开发者ID:jakesyl,项目名称:flexicontent,代码行数:12,代码来源:template.php


注:本文中的JModelLegacy::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。