本文整理汇总了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';
}
示例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();
}
示例3:
function __construct()
{
parent::__construct();
$this->zas_model = VmModel::getModel('zasilkovna');
$this->setMainTable('orders');
$this->addvalidOrderingFieldName(array('order_name', 'payment_method', 'virtuemart_order_id'));
}
示例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';
}
示例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');
}
示例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();
}
示例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';
}
示例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');
}
示例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();
}
示例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();
}
示例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);
}
示例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'));
}
示例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';
}
示例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';
}
示例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');
}