S
S
Skrolea2016-06-30 23:36:37
Yii
Skrolea, 2016-06-30 23:36:37

What's wrong with begin() end() in a widget?

What I can't imagine.
Divided your widget into

<?= HamburgerMenu::begin(['options' => ['class' => 'header__menu', 'buttonClass' => 'menu__button', 'id' => 'menu_button']])?>
  <?= HamburgerMenu::end()?>
(I want to place the Menu widget call inside)
And I get the error Object of class app\widgets\HamburgerMenu could not be converted to string
If you just call the widget (without begin, end), then everything works fine.
What does he want to see in a line there?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Walt Disney, 2016-07-01
@Skrolea

<?= foo?> This is the same as <? echo foo ?>
you probably need to remove the equal sign after the question

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question