示例#1
0
 /**
  * Retrieve default attribute backend model by attribute code
  *
  * @return string
  */
 protected function _getDefaultBackendModel()
 {
     switch ($this->getAttributeCode()) {
         case 'created_at':
             return 'Magento\\Eav\\Model\\Entity\\Attribute\\Backend\\Time\\Created';
         case 'updated_at':
             return 'Magento\\Eav\\Model\\Entity\\Attribute\\Backend\\Time\\Updated';
         case 'store_id':
             return 'Magento\\Eav\\Model\\Entity\\Attribute\\Backend\\Store';
         case 'increment_id':
             return 'Magento\\Eav\\Model\\Entity\\Attribute\\Backend\\Increment';
         default:
             break;
     }
     return parent::_getDefaultBackendModel();
 }