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


PHP Attribute::getId方法代码示例

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


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

示例1: ensureConsistency

 /**
  * Checks and repairs the internal consistency of the object.
  *
  * This method is executed after an already-instantiated object is re-hydrated
  * from the database.  It exists to check any foreign keys to make sure that
  * the objects related to the current object are correct based on foreign key.
  *
  * You can override this method in the stub class, but you should always invoke
  * the base method from the overridden method (i.e. parent::ensureConsistency()),
  * in case your model changes.
  *
  * @throws PropelException
  */
 public function ensureConsistency()
 {
     if ($this->aCategory !== null && $this->category_id !== $this->aCategory->getId()) {
         $this->aCategory = null;
     }
     if ($this->aAttribute !== null && $this->attribute_id !== $this->aAttribute->getId()) {
         $this->aAttribute = null;
     }
 }
开发者ID:thelia-modules,项目名称:CriteriaSearch,代码行数:22,代码来源:CriteriaSearchCategoryAttribute.php

示例2: ensureConsistency

 /**
  * Checks and repairs the internal consistency of the object.
  *
  * This method is executed after an already-instantiated object is re-hydrated
  * from the database.  It exists to check any foreign keys to make sure that
  * the objects related to the current object are correct based on foreign key.
  *
  * You can override this method in the stub class, but you should always invoke
  * the base method from the overridden method (i.e. parent::ensureConsistency()),
  * in case your model changes.
  *
  * @throws PropelException
  */
 public function ensureConsistency()
 {
     if ($this->aCartItem !== null && $this->cart_item_id !== $this->aCartItem->getId()) {
         $this->aCartItem = null;
     }
     if ($this->aAttribute !== null && $this->attribute_id !== $this->aAttribute->getId()) {
         $this->aAttribute = null;
     }
     if ($this->aAttributeAv !== null && $this->attribute_av_id !== $this->aAttributeAv->getId()) {
         $this->aAttributeAv = null;
     }
 }
开发者ID:bcbrr,项目名称:LegacyProductAttributes,代码行数:25,代码来源:LegacyCartItemAttributeCombination.php

示例3: addAttribute

 public function addAttribute(Attribute $attribute)
 {
     $this->attributes[$attribute->getId()] = $attribute;
 }
开发者ID:kniffo80,项目名称:Genisys,代码行数:4,代码来源:AttributeMap.php


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