當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。