Files
stemcell/app/code/Stemcell/Customer/Block/Address/Edit.php
T
2026-09-15 10:26:34 +08:00

20 lines
499 B
PHP

<?php
namespace Stemcell\Customer\Block\Address;
use Magento\Framework\Api\AttributeInterface;
class Edit extends \Magento\Customer\Block\Address\Edit
{
public function getCustomAttributeValue(String $attributeCode) {
$attribute = $this->getAddress()->getCustomAttribute($attributeCode);
return $attribute instanceof AttributeInterface? $attribute->getValue():'';
}
public function getRegionId()
{
return (int)$this->getAddress()->getRegionId();
}
}