本文整理匯總了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);
}
示例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);
}
示例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();
}
示例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();
}
示例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;
}
示例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);
}