0

i am trying to override model and interface of core api in to my custom module for adding new data but i am not able to override interface to add that data contract.

  • Can you write more with code? – Sohel Rana Apr 1 '17 at 15:04
  • Can you please provide the solution that worked for you.!! – Mano M Jul 19 '18 at 12:57
0

Classes in PHP can implement many interfaces at once. Your best bet is to write your own interface which adds the methods you require, then implement the models you want to implement the interfaces you need.

The interface

interface MyCustomManagementInterface
{
    public myMethod();
}

The Class

class MyCustomClass implements \Magento\Framework\Some\Imterface,
    MyCustomManagementInterface
{
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.