On the controller side, I get the data and send it as an array into the view. In the form of an array starting to make cards of goods. I am trying to make the logic of creating a card in a separate form, to create a function so that you can
$this->layout = false; return $this->render('page', compact('data')); get ready HTML and embed it where needed. I tried to write static functions on the controller side and call them out of sight, but it’s not so good. And it begins that static functions cannot access non-static functions, etc. And in the static method does not work $this->layout = false; and everything related to $this .
In a word, how to be? How can you implement?
<?= $this->render('card_item') ?>? - pa3py6aka