/** * Get container buttons HTML * * Since buttons are set as children, we remove them as children after generating them * not to duplicate them in future * * @param null $area * @return string * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getButtonsHtml($area = null) { if (null === $this->_buttonsHtml) { $this->_buttonsHtml = parent::getButtonsHtml(); $layout = $this->getLayout(); foreach ($this->getChildNames() as $name) { $alias = $layout->getElementAlias($name); if (false !== strpos($alias, '_button')) { $layout->unsetChild($this->getNameInLayout(), $alias); } } } return $this->_buttonsHtml; }