本文整理汇总了PHP中tmsModel::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP tmsModel::__construct方法的具体用法?PHP tmsModel::__construct怎么用?PHP tmsModel::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tmsModel
的用法示例。
在下文中一共展示了tmsModel::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
/**
* 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');
}
示例2: vmdebug
/**
* 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');
if ($task == 'add') {
$myarray = array('r.created_on', 'tsmart_rating_review_id', 'vote');
$this->removevalidOrderingFieldName('created_on');
$this->removevalidOrderingFieldName('product_name');
$this->removevalidOrderingFieldName('tsmart_rating_id');
$this->removevalidOrderingFieldName('rating');
$this->_selectedOrdering = 'r.created_on';
} else {
$myarray = array('pr.created_on', 'tsmart_rating_review_id', 'vote');
$this->removevalidOrderingFieldName('created_on');
$this->removevalidOrderingFieldName('product_name');
$this->removevalidOrderingFieldName('tsmart_rating_id');
$this->removevalidOrderingFieldName('rating');
$this->_selectedOrdering = 'pr.created_on';
}
} else {
$myarray = array('created_on', 'product_name', 'tsmart_rating_id');
$this->removevalidOrderingFieldName('pr.created_on');
$this->removevalidOrderingFieldName('tsmart_rating_review_id');
$this->removevalidOrderingFieldName('vote');
$this->_selectedOrdering = 'created_on';
}
$this->addvalidOrderingFieldName($myarray);
}
示例3:
/**
* constructs a VmModel
* setMainTable defines the maintable of the model
* @author Max Milbers
*/
function __construct()
{
parent::__construct('tsmart_custom_id');
$this->setMainTable('customs');
$this->setToggleName('admin_only');
$this->setToggleName('is_hidden');
}
示例4:
/**
* constructs a VmModel
* setMainTable defines the maintable of the model
* @author Max Milbers
*/
function __construct()
{
parent::__construct('tsmart_media_id');
$this->setMainTable('medias');
$this->addvalidOrderingFieldName(array('ordering'));
$this->_selectedOrdering = 'created_on';
}
示例5: __construct
/**
* Constructor for the calc model.
*
* The calc id is read and detmimined if it is an array of ids or just one single id.
*
* @author RickG
*/
public function __construct()
{
parent::__construct();
$this->setMainTable('calcs');
$this->setToggleName('calc_shopper_published');
$this->setToggleName('calc_vendor_published');
$this->setToggleName('shared');
$this->addvalidOrderingFieldName(array('tsmart_category_id', 'tsmart_country_id', 'tsmart_state_id', 'tsmart_shoppergroup_id', 'tsmart_manufacturer_id'));
}
示例6:
/**
* constructs a VmModel
* setMainTable defines the maintable of the model
* @author Max Milbers
*/
function __construct()
{
parent::__construct('tsmart_manufacturer_id');
$this->setMainTable('manufacturers');
$this->addvalidOrderingFieldName(array('m.tsmart_manufacturer_id', 'mf_name', 'mf_desc', 'mf_category_name', 'mf_url'));
$this->removevalidOrderingFieldName('tsmart_manufacturer_id');
$this->_selectedOrdering = 'mf_name';
$this->_selectedOrderingDir = 'ASC';
}
示例7:
/**
* constructs a VmModel
* setMainTable defines the maintable of the model
*
* @author Max Milbers
*/
function __construct()
{
parent::__construct();
//Todo multivendor nasty hack, to get vendor with id 1
if (tsmConfig::get('multix', 'none') == 'none') {
$this->setId(1);
}
$this->setMainTable('vendors');
}
示例8:
/**
* Constructor for the user model.
*
* The user ID is read and determined if it is an array of ids or just one single id.
*/
function __construct()
{
parent::__construct('tsmart_user_id');
$this->setToggleName('user_is_vendor');
$this->addvalidOrderingFieldName(array('ju.username', 'ju.name', 'ju.email', 'sg.tsmart_shoppergroup_id', 'shopper_group_name', 'shopper_group_desc', 'vmu.tsmart_user_id'));
$this->setMainTable('vmusers');
$this->removevalidOrderingFieldName('tsmart_user_id');
array_unshift($this->_validOrderingFieldName, 'ju.id');
}
示例9:
/**
* constructs a VmModel
* setMainTable defines the maintable of the model
*/
function __construct()
{
parent::__construct();
$this->setMainTable('categories');
$this->addvalidOrderingFieldName(self::$_validOrderingFields);
$toCheck = tsmConfig::get('browse_cat_orderby_field', 'category_name');
if (!in_array($toCheck, $this->_validOrderingFieldName)) {
$toCheck = 'category_name';
}
$this->_selectedOrdering = $toCheck;
$this->_selectedOrderingDir = tsmConfig::get('cat_brws_orderby_dir', 'ASC');
$this->setToggleName('shared');
}
示例10: array
/**
* constructs a VmModel
* setMainTable defines the maintable of the model
* @author Max Milbers
*/
function __construct()
{
parent::__construct('tsmart_userfield_id');
$this->setMainTable('userfields');
$this->setToggleName('required');
$this->setToggleName('cart');
$this->setToggleName('shipment');
$this->setToggleName('account');
// Instantiate the Helper class
self::$_cache_ordered = null;
self::$_cache_named = array();
$this->_selectedOrdering = 'ordering';
$this->_selectedOrderingDir = 'ASC';
tsmConfig::loadJLang('com_tsmart_shoppers', TRUE);
}
示例11:
function __construct()
{
parent::__construct();
$this->setMainTable('orders');
$this->setDatePresets();
$app = JFactory::getApplication();
$this->period = $app->getUserStateFromRequest('com_tsmart.revenue.period', 'period', 'last30', 'string');
//$post = vRequest::get ('post');
//vmdebug ('$post ', $post);
if (empty($this->period) or $this->period != 'none') {
$this->setPeriodByPreset();
} else {
$this->setPeriod();
}
$this->removevalidOrderingFieldName('tsmart_order_id');
$this->addvalidOrderingFieldName(array('product_quantity', 'o.tsmart_order_id'));
$this->_selectedOrdering = 'created_on';
}
示例12:
/**
* constructs a VmModel
* setMainTable defines the maintable of the model
*
* @author Max Milbers
*/
function __construct()
{
parent::__construct('tsmart_customfield_id');
$this->setMainTable('product_customfields');
}
示例13:
/**
* constructs a VmModel
* setMainTable defines the maintable of the model
* @author Max Milbers
*/
function __construct()
{
parent::__construct();
$this->setMainTable('hotel');
}
示例14:
/**
* constructs a VmModel
* setMainTable defines the maintable of the model
* @author Max Milbers
*/
function __construct()
{
parent::__construct('tsmart_manufacturercategories_id');
$this->setMainTable('manufacturercategories');
$this->addvalidOrderingFieldName(array('mf_category_name'));
}
示例15:
/**
* constructs a VmModel
* setMainTable defines the maintable of the model
*/
function __construct()
{
parent::__construct('tsmart_product_id');
$this->setMainTable('products');
$this->addvalidOrderingFieldName(array('product_name', 'product_sku', 'product_in_stock', 'product_price', 'product_weight', 'published'));
}