04.07.2019 Views

frontend-developer-1

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Create and Customize Template Files<br />

• getChildChildHtml($alias, $childChildAlias = '',<br />

$useCache = true): this method returns the HTML from a grandchild<br />

block.<br />

• getChildData($alias, $key = ''): calls getData on a child block.<br />

• formatDate($date = null, $format = \<br />

IntlDateFormatter::SHORT, $showTime = false, $timezone =<br />

null)<br />

• formatTime($time = null, $format = \<br />

IntlDateFormatter::SHORT, $showDate = false)<br />

• getModuleName()<br />

• escapeHtml($data, $allowedTags = null)<br />

• escapeJs($string)<br />

• escapeHtmlAttr($string, $escapeSingleQuote = true)<br />

• escapeCss($string)<br />

• stripTags($data, $allowableTags = null,<br />

$allowHtmlEntries = false)<br />

• escapeUrl($string)<br />

• getVar($name, $module = null): locates a value from the theme's<br />

etc/view.xml<br />

How can a child block be rendered?<br />

$block->getChildHtml('child-name');<br />

Copyright © 2018, SwiftOtter, Inc.<br />

53

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!