/** * @param BlockInterface|FieldInterface $block * @param bool $check * * @return string */ public function deleteButton($block, $check = true) { $res = ''; if ((int) $block->getName() != 0 || count($block->getParent()->children()) > 1 || !$check) { $templateStr = Config::get(['renderer', 'templates', $block->getTemplate(), 'deleteButton']); $template = new Template($templateStr); $res = $template->getString($this, $block); } return $res; }