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


PHP ObjectModel::getFields方法代码示例

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


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

示例1: getFields

 /**
  * @see ObjectModel::getFields()
  * @return array
  */
 public function getFields()
 {
     if (empty($this->language_code)) {
         $this->language_code = $this->iso_code;
     }
     return parent::getFields();
 }
开发者ID:rrameshsat,项目名称:Prestashop,代码行数:11,代码来源:Language.php

示例2: 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

示例3: getFields

 /**
  * @see ObjectModel::getFields()
  * @return array
  */
 public function getFields()
 {
     if (!$this->id_shop_group) {
         $this->id_shop_group = Context::getContext()->shop->id_shop_group;
     }
     $fields = parent::getFields();
     return $fields;
 }
开发者ID:toufikadfab,项目名称:PrestaShop-1.5,代码行数:12,代码来源:Connection.php

示例4: getFields

 /**
  * @see ObjectModel::getFields()
  * @return array
  */
 public function getFields()
 {
     $fields = parent::getFields();
     if (!$fields['date_expiration']) {
         $fields['date_expiration'] = '0000-00-00 00:00:00';
     }
     return $fields;
 }
开发者ID:jpodracky,项目名称:dogs,代码行数:12,代码来源:ProductDownload.php

示例5: getFields

 /**
  * @see ObjectModel::getFields()
  * @return array
  */
 public function getFields()
 {
     if (empty($this->stats_date_from)) {
         $this->stats_date_from = date('Y-m-d 00:00:00');
     }
     if (empty($this->stats_date_to)) {
         $this->stats_date_to = date('Y-m-d 23:59:59');
     }
     return parent::getFields();
 }
开发者ID:rongandat,项目名称:vatfairfoot,代码行数:14,代码来源:Employee.php

示例6: getFields

 public function getFields()
 {
     $fields = parent::getFields();
     if ($this->id_shop) {
         $fields['id_shop'] = (int) $this->id_shop;
     } else {
         $fields['id_shop'] = Context::getContext()->shop->id;
     }
     return $fields;
 }
开发者ID:TheTypoMaster,项目名称:neonflexible,代码行数:10,代码来源:NowBlockFooterCmsColumn.php

示例7: getFields

 public function getFields()
 {
     $fields = parent::getFields();
     if (version_compare(_PS_VERSION_, '1.5', '<')) {
         $fields['result'] = pSQL($this->result);
         $fields['capture_amount'] = pSQL($this->capture_amount);
         $fields['date_add'] = pSQL($this->date_add);
         $fields['date_upd'] = pSQL($this->date_upd);
         $fields['id_order'] = pSQL($this->id_order);
     }
     return $fields;
 }
开发者ID:pacxs,项目名称:pacxscom,代码行数:12,代码来源:PaypalCapture.php

示例8: getFields

 /**
  * @see ObjectModel::getFields()
  * @return array
  */
 public function getFields()
 {
     $this->physical_uri = trim($this->physical_uri, '/');
     if ($this->physical_uri) {
         $this->physical_uri = preg_replace('#/+#', '/', '/' . $this->physical_uri . '/');
     } else {
         $this->physical_uri = '/';
     }
     $this->virtual_uri = trim($this->virtual_uri, '/');
     if ($this->virtual_uri) {
         $this->virtual_uri = preg_replace('#/+#', '/', trim($this->virtual_uri, '/')) . '/';
     }
     return parent::getFields();
 }
开发者ID:jicheng17,项目名称:vipinsg,代码行数:18,代码来源:ShopUrl.php

示例9: getFields

 public function getFields()
 {
     $fields = parent::getFields();
     // @todo add null management in definitions
     if ($this->id_shop) {
         $fields['id_shop'] = (int) $this->id_shop;
     } else {
         $fields['id_shop'] = null;
     }
     if ($this->id_shop_group) {
         $fields['id_shop_group'] = (int) $this->id_shop_group;
     } else {
         $fields['id_shop_group'] = null;
     }
     return $fields;
 }
开发者ID:zangles,项目名称:lennyba,代码行数:16,代码来源:Delivery.php

示例10: getFields

 /**
  * @see ObjectModel::getFields()
  * @return array
  */
 public function getFields()
 {
     if (empty($this->stats_date_from) || $this->stats_date_from == '0000-00-00') {
         $this->stats_date_from = date('Y-m-d', strtotime('-1 month'));
     }
     if (empty($this->stats_compare_from) || $this->stats_compare_from == '0000-00-00') {
         $this->stats_compare_from = null;
     }
     if (empty($this->stats_date_to) || $this->stats_date_to == '0000-00-00') {
         $this->stats_date_to = date('Y-m-d');
     }
     if (empty($this->stats_compare_to) || $this->stats_compare_to == '0000-00-00') {
         $this->stats_compare_to = null;
     }
     return parent::getFields();
 }
开发者ID:jpodracky,项目名称:dogs,代码行数:20,代码来源:Employee.php

示例11: getFields

 /**
  * @see ObjectModel::getFields()
  * @return array
  */
 public function getFields()
 {
     if (!$this->id_lang) {
         $this->id_lang = Configuration::get('PS_LANG_DEFAULT', null, null, $this->id_shop);
     }
     return parent::getFields();
 }
开发者ID:TheTypoMaster,项目名称:neotienda,代码行数:11,代码来源:NeoExchanges.php

示例12: getFields

 public function getFields()
 {
     if (version_compare(_PS_VERSION_, '1.5', '<')) {
         parent::validateFields();
         $definition = $this->getDefinitionProperty();
         // child class name
         foreach ($definition['fields'] as $field_name => $field) {
             if ($field_name == $this->identifier && isset($this->{$field_name})) {
                 $fields[$field_name] = $this->{$field_name};
             } else {
                 switch ($field['type']) {
                     case 1:
                         $fields[$field_name] = (int) $this->{$field_name};
                         break;
                     case 2:
                         $fields[$field_name] = (bool) $this->{$field_name};
                         break;
                     case 3:
                     case 5:
                     case 6:
                         $fields[$field_name] = pSQL($this->{$field_name}, true);
                         break;
                     case 4:
                         $fields[$field_name] = (double) $this->{$field_name};
                         break;
                     case 7:
                         $fields[$field_name] = $this->{$field_name};
                         break;
                 }
             }
         }
         return $fields;
     } else {
         return parent::getFields();
     }
 }
开发者ID:ventsiwad,项目名称:presta_addons,代码行数:36,代码来源:ObjectModel.php

示例13: getFields

 public function getFields()
 {
     if (version_compare(_PS_VERSION_, '1.5', '<')) {
         parent::validateFields();
         $caller_class_name = $this->getCallerClassName();
         // child class name
         $fields = array();
         if (property_exists($caller_class_name, 'definition')) {
             $class_variables = get_class_vars($caller_class_name);
             foreach ($class_variables['definition']['fields'] as $field_name => $field) {
                 if ($field_name == $this->identifier && isset($this->{$field_name})) {
                     $fields[$field_name] = $this->{$field_name};
                 } else {
                     switch ($field['type']) {
                         case 1:
                             $fields[$field_name] = (int) $this->{$field_name};
                             break;
                         case 2:
                             $fields[$field_name] = (bool) $this->{$field_name};
                             break;
                         case 3:
                         case 5:
                         case 6:
                             $fields[$field_name] = pSQL($this->{$field_name}, true);
                             break;
                         case 4:
                             $fields[$field_name] = (double) $this->{$field_name};
                             break;
                         case 7:
                             $fields[$field_name] = $this->{$field_name};
                             break;
                     }
                 }
             }
         }
         return $fields;
     } else {
         return parent::getFields();
     }
 }
开发者ID:remixaz,项目名称:dpdgroup,代码行数:40,代码来源:ObjectModel.php

示例14: getFields

 public function getFields()
 {
     if (version_compare(_PS_VERSION_, '1.5', '<')) {
         parent::validateFields();
         $definition = $this->getDefinitionProperty();
         // child class name
         $fields = array();
         foreach ($definition['fields'] as $field_name => $field) {
             if ($field_name == $this->identifier && isset($this->{$field_name})) {
                 $fields[$field_name] = $this->{$field_name};
             } else {
                 if (!is_array($this->{$field_name})) {
                     $fields[$field_name] = $this->cast($field['type'], $this->{$field_name});
                 }
             }
         }
         return $fields;
     } else {
         return parent::getFields();
     }
 }
开发者ID:ventsiwad,项目名称:presta_addons,代码行数:21,代码来源:ObjectModel.php


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