M
M
MADSMILEXD2017-05-06 11:54:03
Yii
MADSMILEXD, 2017-05-06 11:54:03

How to override functions from vendor in Yii2?

in lib, you need to add 1 function and slightly redo the other, but so far it was only enough to copy-paste the file into components ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2017-05-06
@MADSMILEXD

1) Create a class
2) Inherit from the required vendor class
3) Create your own function. Redefine the required function
4) Use the overridden class, where the vendor's used to be
5) profit

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question