当前位置: 首页>>代码示例>>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;未经允许,请勿转载。