當前位置: 首頁>>代碼示例>>PHP>>正文


PHP AEntity::getId方法代碼示例

本文整理匯總了PHP中XLite\Model\AEntity::getId方法的典型用法代碼示例。如果您正苦於以下問題:PHP AEntity::getId方法的具體用法?PHP AEntity::getId怎麽用?PHP AEntity::getId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在XLite\Model\AEntity的用法示例。


在下文中一共展示了AEntity::getId方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: buildMetodName

 /**
  * Build metod name
  *
  * @param \XLite\Model\AEntity $entity  Entity
  * @param string               $pattern Pattern
  *
  * @return string
  */
 protected function buildMetodName(\XLite\Model\AEntity $entity, $pattern)
 {
     return static::TYPE_DISCOUNTS == $entity->getId() ? sprintf($pattern, 'Discounts') : parent::buildMetodName($entity, $pattern);
 }
開發者ID:kewaunited,項目名稱:xcart,代碼行數:12,代碼來源:RemoveData.php

示例2: buildMetodName

 /**
  * Build metod name
  *
  * @param \XLite\Model\AEntity $entity  Entity
  * @param string               $pattern Pattern
  *
  * @return string
  */
 protected function buildMetodName(\XLite\Model\AEntity $entity, $pattern)
 {
     return static::TYPE_COUPONS == $entity->getId() ? sprintf($pattern, 'Coupons') : parent::buildMetodName($entity, $pattern);
 }
開發者ID:kewaunited,項目名稱:xcart,代碼行數:12,代碼來源:RemoveData.php

示例3: isDefaultCard

 /**
  * Check - specified card is default or not
  * 
  * @param \XLite\Model\AEntity $entity Model OPTIONAL
  *  
  * @return boolean
  */
 public function isDefaultCard(\XLite\Model\AEntity $entity = null)
 {
     return $entity && $entity->getId() == $this->getCustomerProfile()->getDefaultCardId();
 }
開發者ID:kirkbauer2,項目名稱:kirkxc,代碼行數:11,代碼來源:SavedCards.php

示例4: isDefaultEntity

 /**
  * Is default entity
  *
  * @param \XLite\Model\AEntity $entity Line
  *
  * @return boolean
  */
 protected function isDefaultEntity(\XLite\Model\AEntity $entity)
 {
     return isset($this->requestData['defaultValue']) && $this->requestData['defaultValue'] == $entity->getId();
 }
開發者ID:kewaunited,項目名稱:xcart,代碼行數:11,代碼來源:AModel.php

示例5: buildMetodName

 /**
  * Build metod name 
  * 
  * @param \XLite\Model\AEntity $entity  Entity
  * @param string               $pattern Pattern
  *  
  * @return string
  */
 protected function buildMetodName(\XLite\Model\AEntity $entity, $pattern)
 {
     switch ($entity->getId()) {
         case static::TYPE_PRODUCTS:
             $name = 'Products';
             break;
         case static::TYPE_CATEGORIES:
             $name = 'Categories';
             break;
         case static::TYPE_ORDERS:
             $name = 'Orders';
             break;
         case static::TYPE_CUSTOMERS:
             $name = 'Customers';
             break;
         default:
     }
     return $name ? sprintf($pattern, $name) : null;
 }
開發者ID:kewaunited,項目名稱:xcart,代碼行數:27,代碼來源:RemoveData.php

示例6: getEditLinkAttributes

 /**
  * Get edit link params string
  *
  * @param \XLite\Model\AEntity $entity Entity
  * @param array                $column Column data
  *
  * @return string
  */
 protected function getEditLinkAttributes(\XLite\Model\AEntity $entity, array $column)
 {
     $params = array();
     $params[] = 'data-id=' . $entity->getId();
     if ($entity->getProductClass()) {
         $params[] = 'data-class-id=' . $entity->getProductClass()->getId();
     }
     return parent::getEditLinkAttributes($entity, $column) . implode(' ', $params);
 }
開發者ID:kirkbauer2,項目名稱:kirkxc,代碼行數:17,代碼來源:Attribute.php


注:本文中的XLite\Model\AEntity::getId方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。