本文整理汇总了PHP中Mage_Eav_Model_Entity_Attribute_Backend_Abstract::afterLoad方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Eav_Model_Entity_Attribute_Backend_Abstract::afterLoad方法的具体用法?PHP Mage_Eav_Model_Entity_Attribute_Backend_Abstract::afterLoad怎么用?PHP Mage_Eav_Model_Entity_Attribute_Backend_Abstract::afterLoad使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Eav_Model_Entity_Attribute_Backend_Abstract
的用法示例。
在下文中一共展示了Mage_Eav_Model_Entity_Attribute_Backend_Abstract::afterLoad方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: afterLoad
/**
* After load method
*
* @param Varien_Object $object Object Model
* @return FireGento_DynamicCategory_Model_Entity_Attribute_Backend_Rule Self.
*/
public function afterLoad($object)
{
parent::afterLoad($object);
$attrCode = $this->getAttribute()->getAttributeCode();
$object->setData($attrCode, unserialize($object->getData($attrCode)));
return $this;
}
示例2: afterLoad
/**
* Convert create date from UTC to current store time zone
*
* @param Varien_Object $object
* @return Mage_Eav_Model_Entity_Attribute_Backend_Time_Created
*/
public function afterLoad($object)
{
$attributeCode = $this->getAttribute()->getAttributeCode();
$date = $object->getData($attributeCode);
$zendDate = Mage::app()->getLocale()->storeDate(null, $date, true);
$object->setData($attributeCode, $zendDate->getIso());
parent::afterLoad($object);
return $this;
}
示例3: afterLoad
public function afterLoad($object)
{
$attributeCode = $this->getAttribute()->getAttributeCode();
$data = $object->getData($attributeCode);
if (!is_array($data)) {
$object->setData($attributeCode, @unserialize($data));
}
return parent::afterLoad($object);
}
示例4: afterLoad
/**
* Decrypts the value after load
*
* @param Mage_Core_Model_Abstract $object Object
* @return Itabs_Debit_Model_Entity_Customer_Attribute_Backend_Encrypted
*/
public function afterLoad($object)
{
$helper = Mage::helper('core');
$attributeName = $this->getAttribute()->getName();
if ($object->getData($attributeName) != '') {
$value = $helper->decrypt($object->getData($attributeName));
$object->setData($attributeName, $value);
}
return parent::afterLoad($object);
}
示例5: afterLoad
public function afterLoad($object)
{
$attributeCode = $this->getAttribute()->getName();
if ($attributeCode == self::ATTRIBUTE_CODE) {
$data = $object->getData($attributeCode);
if (!is_array($data)) {
$object->setData($attributeCode, explode(',', $data));
}
}
parent::afterLoad($object);
}
示例6: afterLoad
public function afterLoad($object)
{
parent::afterLoad($object);
if (!$this->_isEnabled()) {
return;
}
$attrCode = $this->getAttribute()->getAttributeCode();
$defValue = $this->getDefaultValue();
if (!$object->getData($attrCode) && $defValue) {
$object->setData($attrCode, $defValue);
}
}
示例7: afterLoad
/**
* Unserialize after loading
*
* @param Varien_Object $object
* @return Mage_Eav_Model_Entity_Attribute_Backend_Serialized
*/
public function afterLoad($object)
{
parent::afterLoad($object);
$this->_unserialize($object);
return $this;
}
示例8: afterLoad
/**
* Set category ids to product data
*
* @param Mage_Catalog_Model_Product $object
* @return Mage_Eav_Model_Entity_Attribute_Backend_Abstract
*/
public function afterLoad($object)
{
$object->setData($this->getAttribute()->getAttributeCode(), $object->getCategoryIds());
return parent::afterLoad($object);
}
示例9: afterLoad
/**
* In case the data was loaded, explode it into an array
*
* @param Mage_Core_Model_Abstract $object
* @return Mage_Eav_Model_Entity_Attribute_Backend_Abstract
*/
public function afterLoad($object)
{
$attributeCode = $this->getAttribute()->getAttributeCode();
$data = $object->getData($attributeCode);
// only explode and set the value if the attribute is set on the model
if (null !== $data && is_string($data)) {
$data = explode(',', $data);
$object->setData($attributeCode, $data);
}
return parent::afterLoad($object);
}
示例10: afterLoad
/**
* Convert create date from UTC to current store time zone
*
* @param Varien_Object $object
* @return Mage_Eav_Model_Entity_Attribute_Backend_Time_Created
*/
public function afterLoad($object)
{
$attributeCode = $this->getAttribute()->getAttributeCode();
$date = $object->getData($attributeCode);
// ADD THIS
if (!is_null($date)) {
$date = strtotime($date);
}
$zendDate = Mage::app()->getLocale()->storeDate(null, $date, true, $this->_getFormat($date));
$object->setData($attributeCode, $zendDate->getIso());
parent::afterLoad($object);
return $this;
}