Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Actions.php
Go to the documentation of this file.
1 <?php
7 
11 
16 class Actions extends Text
17 {
21  protected $item;
22 
29  public function getItem()
30  {
31  return $this->item;
32  }
33 
41  public function setItem(AbstractItem $item)
42  {
43  $this->item = $item;
44  return $this;
45  }
46 
52  protected function _toHtml()
53  {
54  $this->setText('');
55 
56  $layout = $this->getLayout();
57  foreach ($this->getChildNames() as $child) {
59  $childBlock = $layout->getBlock($child);
60  if ($childBlock instanceof Generic) {
61  $childBlock->setItem($this->getItem());
62  $this->addText($layout->renderElement($child, false));
63  }
64  }
65 
66  return parent::_toHtml();
67  }
68 }
addText($text, $before=false)
Definition: Text.php:45