当前位置: 首页>>代码示例>>PHP>>正文


PHP ObjectModel类代码示例

本文整理汇总了PHP中ObjectModel的典型用法代码示例。如果您正苦于以下问题:PHP ObjectModel类的具体用法?PHP ObjectModel怎么用?PHP ObjectModel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ObjectModel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getFields

 /**
  * @see ObjectModel::getFields()
  * @return array
  */
 public function getFields()
 {
     if (!$this->share_customer || !$this->share_stock) {
         $this->share_order = false;
     }
     return parent::getFields();
 }
开发者ID:ortegon000,项目名称:tienda,代码行数:11,代码来源:ShopGroup.php

示例2: getFieldsLang

 /**
  * @see ObjectModel::getFieldsLang()
  * @return bool|array Multilingual fields
  */
 public function getFieldsLang()
 {
     if (!is_array($this->value)) {
         return true;
     }
     return parent::getFieldsLang();
 }
开发者ID:stratsimir,项目名称:PrestaShop,代码行数:11,代码来源:Configuration.php

示例3: getByOrderReference

    /**
     * Get the detailed payment of an order
     * @param int $order_reference
     * @return array
     * @since 1.5.0.13
     */
    public static function getByOrderReference($order_reference)
    {
        return ObjectModel::hydrateCollection('OrderPayment', Db::getInstance()->executeS('
			SELECT *
			FROM `' . _DB_PREFIX_ . 'order_payment`
			WHERE `order_reference` = \'' . pSQL($order_reference) . '\''));
    }
开发者ID:ortegon000,项目名称:tienda,代码行数:13,代码来源:OrderPayment.php

示例4: getTranslationsFieldsChild

 /**
  * Check then return multilingual fields for database interaction
  *
  * @return array Multilingual fields
  */
 public function getTranslationsFieldsChild()
 {
     parent::validateFieldsLang();
     $fieldsArray = array('title', 'url');
     $fields = array();
     $languages = Language::getLanguages(false);
     $defaultLanguage = (int) Configuration::get('PS_LANG_DEFAULT');
     foreach ($languages as $language) {
         $fields[$language['id_lang']]['id_lang'] = (int) $language['id_lang'];
         $fields[$language['id_lang']][self::$definition['primary']] = (int) $this->id;
         foreach ($fieldsArray as $field) {
             if (!Validate::isTableOrIdentifier($field)) {
                 die(Tools::displayError());
             }
             if (isset($this->{$field}[$language['id_lang']]) and !empty($this->{$field}[$language['id_lang']])) {
                 $fields[$language['id_lang']][$field] = pSQL($this->{$field}[$language['id_lang']], true);
             } elseif (in_array($field, $this->fieldsRequiredLang)) {
                 $fields[$language['id_lang']][$field] = pSQL($this->{$field}[$defaultLanguage], true);
             } else {
                 $fields[$language['id_lang']][$field] = '';
             }
         }
     }
     return $fields;
 }
开发者ID:arozanski,项目名称:simpleresponsivetheme,代码行数:30,代码来源:ResponsiveLinksClass.php

示例5: getFields

 public function getFields()
 {
     ${"GLOBALS"}["fqnuqhk"] = "fields";
     $qubfmzdfpdc = "fields";
     ${"GLOBALS"}["blespfjwjdc"] = "fields";
     parent::validateFields(false);
     ${"GLOBALS"}["godcvsyi"] = "fields";
     $dgtnok = "fields";
     ${${"GLOBALS"}["njdxasfu"]}["id_seller"] = intval($this->id_seller);
     $xxtfhei = "fields";
     ${"GLOBALS"}["mkfldzuj"] = "fields";
     ${${"GLOBALS"}["fqnuqhk"]}["id_product"] = intval($this->id_product);
     $ubhbmgxsg = "fields";
     ${${"GLOBALS"}["njdxasfu"]}["id_order"] = intval($this->id_order);
     ${$xxtfhei}["id_customer"] = intval($this->id_customer);
     ${$qubfmzdfpdc}["id_lang"] = pSQL($this->id_lang);
     ${${"GLOBALS"}["njdxasfu"]}["ip_address"] = pSQL($this->ip_address);
     ${${"GLOBALS"}["blespfjwjdc"]}["from_email"] = pSQL($this->from_email);
     ${${"GLOBALS"}["njdxasfu"]}["from_name"] = pSQL($this->from_name);
     $dpwypmchkj = "fields";
     ${$ubhbmgxsg}["subject"] = pSQL($this->subject);
     ${${"GLOBALS"}["njdxasfu"]}["message"] = pSQL($this->message);
     ${${"GLOBALS"}["njdxasfu"]}["is_customer_message"] = intval($this->is_customer_message);
     ${${"GLOBALS"}["njdxasfu"]}["active"] = intval($this->active);
     ${$dgtnok}["date_add"] = pSQL($this->date_add);
     ${${"GLOBALS"}["godcvsyi"]}["attpsname1"] = pSQL($this->attpsname1);
     ${${"GLOBALS"}["njdxasfu"]}["attpsname2"] = pSQL($this->attpsname2);
     ${$dpwypmchkj}["attpsname3"] = pSQL($this->attpsname3);
     ${${"GLOBALS"}["njdxasfu"]}["attshname1"] = pSQL($this->attshname1);
     ${${"GLOBALS"}["njdxasfu"]}["attshname2"] = pSQL($this->attshname2);
     ${${"GLOBALS"}["mkfldzuj"]}["attshname3"] = pSQL($this->attshname3);
     return ${${"GLOBALS"}["njdxasfu"]};
 }
开发者ID:evilscripts,项目名称:gy,代码行数:33,代码来源:AgileSellerMessage.php

示例6: delete

    public function delete()
    {
        if (!parent::delete()) {
            return false;
        }
        if ($this->hasMultishopEntries()) {
            return true;
        }
        if (!$this->deleteProductAttributeImage() || !$this->deleteImage()) {
            return false;
        }
        // update positions
        $result = Db::getInstance()->executeS('
			SELECT *
			FROM `' . _DB_PREFIX_ . 'image`
			WHERE `id_product` = ' . (int) $this->id_product . '
			ORDER BY `position`
		');
        $i = 1;
        if ($result) {
            foreach ($result as $row) {
                $row['position'] = $i++;
                Db::getInstance()->update($this->def['table'], $row, '`id_image` = ' . (int) $row['id_image'], 1);
            }
        }
        return true;
    }
开发者ID:ecssjapan,项目名称:guiding-you-afteropen,代码行数:27,代码来源:Image.php

示例7: delete

 public function delete()
 {
     if (!parent::delete() or $this->deleteAssociations() === false) {
         return false;
     }
     return true;
 }
开发者ID:Evil1991,项目名称:PrestaShop-1.4,代码行数:7,代码来源:Combination.php

示例8: getFields

 public function getFields()
 {
     parent::validateFields();
     $fields['name'] = $this->name;
     $fields['active'] = (int) $this->active;
     return $fields;
 }
开发者ID:priyankajsr19,项目名称:indusdiva2,代码行数:7,代码来源:TaxRulesGroup.php

示例9: add

 public function add($autodate = true, $nullValues = false)
 {
     if ($result = parent::add($autodate, $nullValues)) {
         Referrer::cacheNewSource($this->id);
     }
     return $result;
 }
开发者ID:nmardones,项目名称:PrestaShop,代码行数:7,代码来源:ConnectionsSource.php

示例10: delete

 public function delete()
 {
     if (!parent::delete()) {
         return false;
     }
     return Db::getInstance()->execute('DELETE FROM ' . _DB_PREFIX_ . 'cart_rule_country WHERE id_country = ' . (int) $this->id);
 }
开发者ID:FAVHYAN,项目名称:a3workout,代码行数:7,代码来源:Country.php

示例11: delete

 public function delete()
 {
     if ((int) $this->id === 0) {
         return false;
     }
     return SimpleBlogPost::deleteCover($this) && SimpleBlogPost::deleteFeatured($this) && parent::delete();
 }
开发者ID:OaSiis,项目名称:LDDP,代码行数:7,代码来源:SimpleBlogPost.php

示例12: getFields

 public function getFields()
 {
     parent::validateFields();
     $fields['time_start'] = pSQL($this->time_start);
     $fields['time_end'] = pSQL($this->time_end);
     return $fields;
 }
开发者ID:greench,项目名称:prestashop,代码行数:7,代码来源:DateRange.php

示例13: getTranslationsFieldsChild

 public function getTranslationsFieldsChild()
 {
     if (!parent::validateFieldsLang()) {
         return false;
     }
     return parent::getTranslationsFields(array("name"));
 }
开发者ID:evilscripts,项目名称:gy,代码行数:7,代码来源:SellerType.php

示例14: delete

 public function delete()
 {
     if (Db::getInstance()->Execute('DELETE FROM ' . _DB_PREFIX_ . 'access WHERE `id_tab` = ' . intval($this->id)) and parent::delete()) {
         return $this->cleanPositions($this->id_parent);
     }
     return false;
 }
开发者ID:Bruno-2M,项目名称:prestashop,代码行数:7,代码来源:Tab.php

示例15: delete

 public function delete()
 {
     if (parent::delete()) {
         return $this->cleanPositions($this->id_opartslideshow_slideshow);
     }
     return false;
 }
开发者ID:AmineBENCHEIKHBRAHIM,项目名称:LnsTech-Prestashop-WebSite,代码行数:7,代码来源:MyImage.php


注:本文中的ObjectModel类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。