當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。