Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
All Data Structures Namespaces Files Functions Variables Pages
Esi.php
Go to the documentation of this file.
1 <?php
8 
10 {
16  public function execute()
17  {
18  $response = $this->getResponse();
19  $blocks = $this->_getBlocks();
20  $html = '';
21  $ttl = 0;
22 
23  if (!empty($blocks)) {
24  $blockInstance = array_shift($blocks);
25  $html = $blockInstance->toHtml();
26  $ttl = $blockInstance->getTtl();
27  if ($blockInstance instanceof \Magento\Framework\DataObject\IdentityInterface) {
28  $response->setHeader('X-Magento-Tags', implode(',', $blockInstance->getIdentities()));
29  }
30  }
31  $this->translateInline->processResponseBody($html);
32  $response->appendBody($html);
33  $response->setPublicHeaders($ttl);
34  }
35 }
$response
Definition: 404.php:11