當前位置: 首頁>>代碼示例>>PHP>>正文


PHP VmModel::__construct方法代碼示例

本文整理匯總了PHP中VmModel::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP VmModel::__construct方法的具體用法?PHP VmModel::__construct怎麽用?PHP VmModel::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在VmModel的用法示例。


在下文中一共展示了VmModel::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

	function __construct () {

		parent::__construct ();
		$this->setMainTable ('orders');

		// set default values always used
		$config = JFactory::getConfig ();
		$this->tzoffset = $config->getValue ('config.offset');
		$this->setDatePresets ();

		$app = JFactory::getApplication ();
		$this->period = $app->getUserStateFromRequest ('com_virtuemart.revenue.period', 'period', 'last30', 'string');

		$post = JRequest::get ('post');
		vmdebug ('$post ', $post);
		if (empty($this->period) or $this->period != 'none') {
			$this->setPeriodByPreset ();
		}
		else {
			$this->setPeriod ();
		}

		$this->removevalidOrderingFieldName ('virtuemart_order_id');
		$this->addvalidOrderingFieldName (array('product_quantity', 'o.virtuemart_order_id'));
		$this->_selectedOrdering = 'created_on';

	}
開發者ID:rubengarcia0510,項目名稱:tienda,代碼行數:27,代碼來源:report.php

示例2: microtime

 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  *
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct('virtuemart_product_id');
     $this->setMainTable('products');
     $this->starttime = microtime(TRUE);
     $this->maxScriptTime = VmConfig::getExecutionTime() * 0.95 - 1;
     $this->memory_limit = VmConfig::getMemoryLimit() - 4;
     // 	$this->addvalidOrderingFieldName(array('m.mf_name','pp.product_price'));
     $app = JFactory::getApplication();
     if ($app->isSite()) {
         $this->_validOrderingFieldName = array();
         $browseOrderByFields = VmConfig::get('browse_orderby_fields', array('product_sku', 'category_name', 'mf_name', 'product_name'));
     } else {
         if (!class_exists('shopFunctions')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'shopfunctions.php';
         }
         $browseOrderByFields = ShopFunctions::getValidProductFilterArray();
         $this->addvalidOrderingFieldName(array('product_price', 'product_sales'));
         //$this->addvalidOrderingFieldName (array('product_price'));
         // 	vmdebug('$browseOrderByFields',$browseOrderByFields);
     }
     $this->addvalidOrderingFieldName((array) $browseOrderByFields);
     $this->removevalidOrderingFieldName('virtuemart_product_id');
     //$this->removevalidOrderingFieldName ('product_sales');
     //unset($this->_validOrderingFieldName[0]);//virtuemart_product_id
     array_unshift($this->_validOrderingFieldName, 'p.virtuemart_product_id');
     $this->_selectedOrdering = VmConfig::get('browse_orderby_field', '`p`.virtuemart_product_id');
     $this->setToggleName('product_special');
     $this->initialiseRequests();
     //This is just done now for the moment for developing, the idea is of course todo this only when needed.
     $this->updateRequests();
 }
開發者ID:aldegtyarev,項目名稱:stelsvelo,代碼行數:38,代碼來源:product.php

示例3:

 function __construct()
 {
     parent::__construct();
     $this->zas_model = VmModel::getModel('zasilkovna');
     $this->setMainTable('orders');
     $this->addvalidOrderingFieldName(array('order_name', 'payment_method', 'virtuemart_order_id'));
 }
開發者ID:Zasilkovna,項目名稱:virtuemart3-joomla2,代碼行數:7,代碼來源:zasilkovna_orders.php

示例4:

 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('states');
     $this->_selectedOrdering = 'state_name';
     $this->_selectedOrderingDir = 'DESC';
 }
開發者ID:denis1001,項目名稱:Virtuemart-2-Joomla-3-Bootstrap,代碼行數:12,代碼來源:state.php

示例5:

 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('shipmentmethods');
     $this->_selectedOrdering = 'ordering';
     $this->setToggleName('shared');
 }
開發者ID:lenard112,項目名稱:cms,代碼行數:12,代碼來源:shipmentmethod.php

示例6:

 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct('virtuemart_manufacturercategories_id');
     $this->setMainTable('manufacturercategories');
     $this->addvalidOrderingFieldName(array('mf_category_name'));
     $config = JFactory::getConfig();
 }
開發者ID:Arturogcalleja,項目名稱:herbolario,代碼行數:12,代碼來源:manufacturercategories.php

示例7:

	/**
	 * constructs a VmModel
	 * setMainTable defines the maintable of the model
	 * @author Max Milbers
	 */
	function __construct() {
		parent::__construct('virtuemart_media_id');
		$this->setMainTable('medias');
		$this->addvalidOrderingFieldName(array('ordering'));
		$this->_selectedOrdering = 'created_on';

	}
開發者ID:rubengarcia0510,項目名稱:tienda,代碼行數:12,代碼來源:media.php

示例8:

 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct('virtuemart_custom_id');
     $this->setMainTable('customs');
     $this->setToggleName('admin_only');
     $this->setToggleName('is_hidden');
 }
開發者ID:srbsnkr,項目名稱:sellingonlinemadesimple,代碼行數:12,代碼來源:custom.php

示例9: microtime

 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  *
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct('virtuemart_product_id');
     $this->setMainTable('products');
     $this->starttime = microtime(TRUE);
     $this->maxScriptTime = ini_get('max_execution_time') * 0.95 - 1;
     // 	$this->addvalidOrderingFieldName(array('m.mf_name','pp.product_price'));
     $view = JRequest::getVar('view');
     $isSite = JFactory::getApplication()->isSite() && $view !== 'product' && $view !== 'inventory';
     if ($isSite) {
         $browseOrderByFields = VmConfig::get('browse_orderby_fields', array('product_sku', 'category_name', 'mf_name', 'product_name'));
     } else {
         JLoader::register('shopFunctions', JPATH_VM_ADMINISTRATOR . 'helpers/shopfunctions.php');
         $browseOrderByFields = ShopFunctions::getValidProductFilterArray();
         $this->addvalidOrderingFieldName(array('product_price', 'p.`product_sales`'));
         //$this->addvalidOrderingFieldName (array('product_price'));
         // 	vmdebug('$browseOrderByFields',$browseOrderByFields);
     }
     $this->addvalidOrderingFieldName((array) $browseOrderByFields);
     $this->removevalidOrderingFieldName('virtuemart_product_id');
     $this->removevalidOrderingFieldName('product_sales');
     //unset($this->_validOrderingFieldName[0]);//virtuemart_product_id
     array_unshift($this->_validOrderingFieldName, 'p.virtuemart_product_id');
     $this->_selectedOrdering = VmConfig::get('browse_orderby_field', '`p`.virtuemart_product_id');
     $this->setToggleName('product_special');
     $this->initialiseRequests();
     //This is just done now for the moment for developing, the idea is of course todo this only when needed.
     $this->updateRequests();
 }
開發者ID:denis1001,項目名稱:Virtuemart-2-Joomla-3-Bootstrap,代碼行數:35,代碼來源:product.php

示例10:

 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('orders');
     $this->addvalidOrderingFieldName(array('order_name', 'order_email', 'payment_method', 'virtuemart_order_id'));
     $this->populateState();
 }
開發者ID:virtuemart-fr,項目名稱:virtuemart-fr,代碼行數:12,代碼來源:orders.php

示例11: array

	/**
	 * constructs a VmModel
	 * setMainTable defines the maintable of the model
	 * @author Max Milbers
	 */
	function __construct() {
		parent::__construct();
		$this->setMainTable('ratings');


		$layout = vRequest::getString('layout','default');
		$task = vRequest::getCmd('task','default');
		if($layout == 'list_reviews' or $task == 'listreviews'){
			vmdebug('in review list');
			$myarray = array('pr.created_on','virtuemart_rating_review_id','vote');
			$this->removevalidOrderingFieldName('created_on');
			$this->removevalidOrderingFieldName('product_name');
			$this->removevalidOrderingFieldName('virtuemart_rating_id');
			$this->removevalidOrderingFieldName('rating');
			$this->_selectedOrdering = 'pr.created_on';
		} else {
			$myarray = array('created_on','product_name','virtuemart_rating_id');
			$this->removevalidOrderingFieldName('pr.created_on');
			$this->removevalidOrderingFieldName('virtuemart_rating_review_id');
			$this->removevalidOrderingFieldName('vote');
			$this->_selectedOrdering = 'created_on';
		}
		$this->addvalidOrderingFieldName($myarray);

	}
開發者ID:kosmosby,項目名稱:medicine-prof,代碼行數:30,代碼來源:ratings.php

示例12:

 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('coupons');
     $this->_selectedOrdering = 'coupon_code';
     $this->_selectedOrderingDir = 'DESC';
     $this->addvalidOrderingFieldName(array('coupon_code', 'percent_or_total', 'coupon_type', 'coupon_value', 'coupon_start_date', 'coupon_expiry_date', 'coupon_value_valid', 'published'));
 }
開發者ID:denis1001,項目名稱:Virtuemart-2-Joomla-3-Bootstrap,代碼行數:13,代碼來源:coupon.php

示例13:

 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct('virtuemart_waitinguser_id');
     $this->setMainTable('waitingusers');
     array_unshift($this->_validOrderingFieldName, 'country_name');
     $this->_selectedOrdering = 'country_name';
     $this->_selectedOrderingDir = 'ASC';
 }
開發者ID:denis1001,項目名稱:Virtuemart-2-Joomla-3-Bootstrap,代碼行數:13,代碼來源:waitinglist.php

示例14:

	/**
	 * constructs a VmModel
	 * setMainTable defines the maintable of the model
	 * @author Max Milbers
	 */
	function __construct() {
		parent::__construct('virtuemart_manufacturer_id');
		$this->setMainTable('manufacturers');
		$this->addvalidOrderingFieldName(array('m.virtuemart_manufacturer_id','mf_name','mf_desc','mf_category_name','mf_url'));
		$this->removevalidOrderingFieldName('virtuemart_manufacturer_id');
		$this->_selectedOrdering = 'mf_name';
		$this->_selectedOrderingDir = 'ASC';
	}
開發者ID:kosmosby,項目名稱:medicine-prof,代碼行數:13,代碼來源:manufacturer.php

示例15:

 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     $this->setMainTable('medias');
     $this->addvalidOrderingFieldName(array('ordering'));
     $this->_selectedOrdering = 'created_on';
     $this->setToggleName('shared');
 }
開發者ID:denis1001,項目名稱:Virtuemart-2-Joomla-3-Bootstrap,代碼行數:13,代碼來源:media.php


注:本文中的VmModel::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。