I have tried to override _processAttributeOptions() method from Magento\Eav\Model\ResourceModel\Entity\Attribute in my custom module. but the function does not override. Here is my code:
Namespace\Module_Name\etc\di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magento\Eav\Model\ResourceModel\Entity\Attribute" type="Namespace\Module_Name\Model\ResourceModel\Entity\Attribute" />
</config>
Namespace\Module_Name\Model\ResourceModel\Entity\Attribute
<?php
namespace Namespace\Module_Name\Model\ResourceModel\Entity;
class Attribute extends \Magento\Eav\Model\ResourceModel\Entity\Attribute
{
protected function _processAttributeOptions($object, $option)
{
//here is my custom code with core
}
}
Please help me to override this method in Magento 2.2.