Friends, welcome!
Puzzled by the question ...

There is a parent class with a method and there is a child class:

class Base { public function action() { return "example 1"; } } class Child extends Base { public function actionOne() { что-то происходит... } } 

How to change the return "example 1" in the action method, for example, to "example 2" when accessing the actionOne method?

And more specifically, for example, when the page is loaded into the layout , $this->getCannonicalUrl , but with a page with pagination so that /2/ not added, etc.

  • 2
    probably so ? - Edward
  • Thank. Already decided, just such a solution ... But why the protected property? - Alexander Karasev
  • the protected property so that it cannot be changed outside of classes. - Edward

0