Magento 2 || Available methods inside block template || metodos disponiveis no template - mpaz-redstage/magento-snippets GitHub Wiki

Quais metodos mais comuns estão disponíveis em $block?
getRootDirectory()
getMediaDirectory()
getUrl()
getBaseUrl()
getChildBlock($alias)
getChildHtml($alias, $useCache = true)
getChildChildHtml($alias, $childChildAlias = ‘’, $useCache = true): this method returns the HTML from a grandchild block
getChildChildHtml($alias, $childChildAlias = ‘’, $useCache = true): este metodo retorna um HTMl  do seu bloco avó
getChildData($alias, $key = ‘’): chama o getData do bloco filho
formatData($date = null, format = IntDateFormatter::SHORT, $showTime = false, $timezone = null)
formatTime($time = null, $format = IntDateFormatter::SHORT, $showDate = false)
getModuleName()
escapeHtml($data, $allowedTags = null)
escapeJs($string)
escapeHtmlAttr($string, $escapeSingleQuote = true)
escapeHtmlAttr($string, $escapeSingleQuote = true)
escapeCss($string)
stripTags($data, $$allowableTags = null, $allowHtmlEntries  false)
escapeUrl($string)
getVar($name, $module = null) locates a value from the theme’s etc/view.xml