Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Text.php
Go to the documentation of this file.
1 <?php
7 
15 {
22  public function setText($text)
23  {
24  $this->setData('text', $text);
25  return $this;
26  }
27 
33  public function getText()
34  {
35  return $this->getData('text');
36  }
37 
45  public function addText($text, $before = false)
46  {
47  if ($before) {
48  $this->setText($text . $this->getText());
49  } else {
50  $this->setText($this->getText() . $text);
51  }
52  }
53 
59  protected function _toHtml()
60  {
61  if (!$this->_beforeToHtml()) {
62  return '';
63  }
64  return $this->getText();
65  }
66 }
getData($key='', $index=null)
Definition: DataObject.php:119
endifif( $block->getLastPageNum()>1)( 'Page') ?></strong >< ul class $text
Definition: pager.phtml:43
addText($text, $before=false)
Definition: Text.php:45
setData($key, $value=null)
Definition: DataObject.php:72