本文整理汇总了PHP中ObjectModel::add方法的典型用法代码示例。如果您正苦于以下问题:PHP ObjectModel::add方法的具体用法?PHP ObjectModel::add怎么用?PHP ObjectModel::add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectModel
的用法示例。
在下文中一共展示了ObjectModel::add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: add
public function add($autodate = true, $nullValues = false)
{
if (parent::add($autodate, true)) {
return Db::getInstance()->Execute('INSERT INTO ' . _DB_PREFIX_ . 'access (SELECT ' . (int) $this->id . ', id_tab, 0, 0, 0, 0 FROM ' . _DB_PREFIX_ . 'tab)');
}
return false;
}
示例2: add
public function add($autodate = true, $null_values = false)
{
if ($this->position <= 0) {
$this->position = Image::getHighestPosition($this->id_product) + 1;
}
return parent::add($autodate, $null_values);
}
示例3: add
public function add($autodate = true, $null_values = false)
{
if (!isset($this->level_depth)) {
$this->level_depth = $this->calcLevelDepth();
}
if ($this->is_root_category && ($id_root_category = (int) Configuration::get('PS_ROOT_CATEGORY'))) {
$this->id_parent = $id_root_category;
}
$ret = parent::add($autodate, $null_values);
if (Tools::isSubmit('checkBoxShopAsso_category')) {
foreach (Tools::getValue('checkBoxShopAsso_category') as $id_shop => $value) {
$position = (int) Category::getLastPosition((int) $this->id_parent, $id_shop);
$this->addPosition($position, $id_shop);
}
} else {
foreach (Shop::getShops(true) as $shop) {
$position = (int) Category::getLastPosition((int) $this->id_parent, $shop['id_shop']);
$this->addPosition($position, $shop['id_shop']);
}
}
if (!isset($this->doNotRegenerateNTree) || !$this->doNotRegenerateNTree) {
Category::regenerateEntireNtree();
}
$this->updateGroup($this->groupBox);
Hook::exec('actionCategoryAdd', array('category' => $this));
return $ret;
}
示例4: addState
public function addState($autodate = true)
{
if (!parent::add($autodate)) {
return false;
}
return true;
}
示例5: add
public function add($autodate = true, $nullValues = false)
{
if ($result = parent::add($autodate, $nullValues)) {
Referrer::cacheNewSource($this->id);
}
return $result;
}
示例6: add
public function add($autodate = true, $nullValues = false)
{
if (WebserviceKey::keyExists($this->key)) {
return false;
}
return parent::add($autodate = true, $nullValues = false);
}
示例7: add
public function add($autodate = true, $null_values = false)
{
if ($this->position <= 0) {
$this->position = SmartBlogGallaryImage::getHighestPosition($this->id_smart_blog_post) + 1;
}
return parent::add($autodate, $null_values);
}
示例8: add
public function add($autodate = true, $null_values = false)
{
$this->getFieldsValues();
$result = parent::add($autodate, $null_values);
$this->updateShopManuf();
return $result;
}
示例9: add
public function add($autodate = true, $null_values = false)
{
// $this->position = self::getLastPosition((int)$this->id_leoblogcat);
$context = Context::getContext();
$this->id_shop = $context->shop->id;
return parent::add($autodate, $null_values);
}
示例10: add
/**
* Overriding check if currency rate is not empty and if currency with the same iso code already exists.
* If it's true, currency is not added.
*
* @see ObjectModelCore::add()
*/
public function add($autodate = true, $nullValues = false)
{
if ((double) $this->conversion_rate <= 0) {
return false;
}
return Currency::exists($this->iso_code, $this->iso_code_num) ? false : parent::add($autodate, $nullValues);
}
示例11: add
public function add($autodate = true, $nullValues = false)
{
$this->position = self::getNbTabs($this->id_parent) + 1;
if (parent::add($autodate, $nullValues)) {
return self::initAccess($this->id);
}
return false;
}
示例12: add
public function add($autodate = true, $nullValues = false)
{
if (parent::add($autodate, $nullValues)) {
Module::hookExec('paymentCCAdded', array('paymentCC' => $this));
return true;
}
return false;
}
示例13: add
public function add($autodate = true, $nullValues = false, $categories = null)
{
if (parent::add($autodate, $nullValues)) {
$ret = true;
}
$this->updateCategories($categories);
return $ret;
}
示例14: add
public function add($autodate = true, $nullValues = true)
{
if (!parent::add($autodate, $nullValues)) {
return false;
}
$this->FeatureId = $this->id;
return true;
}
示例15: add
public function add($autodate = true, $nullValues = false)
{
if (parent::add($autodate, $nullValues)) {
Hook::exec('actionPaymentCCAdd', array('paymentCC' => $this));
return true;
}
return false;
}