Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
HeaderMixin.php
Go to the documentation of this file.
1 <?php
7 
12 {
19  public function apply($text)
20  {
21  $paragraphs = explode(PHP_EOL, trim($text));
22  $magicLengthNumber = 10;
23 
24  foreach ($paragraphs as &$paragraph) {
25  $rawText = trim(strip_tags($paragraph));
26  if (empty($rawText)) {
27  continue;
28  }
29 
30  $headerText = substr($rawText, 0, strpos($rawText, ' ', $magicLengthNumber));
31  $paragraph = '<h1>' . $headerText . '</h1>' . PHP_EOL . $paragraph;
32  }
33 
34  return implode(PHP_EOL, $paragraphs);
35  }
36 }
endifif( $block->getLastPageNum()>1)( 'Page') ?></strong >< ul class $text
Definition: pager.phtml:43