Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Label.php
Go to the documentation of this file.
1 <?php
13 
14 class Label extends \Magento\Framework\Data\Form\Element\AbstractElement
15 {
22  public function __construct(
23  \Magento\Framework\Data\Form\Element\Factory $factoryElement,
24  \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection,
25  \Magento\Framework\Escaper $escaper,
26  $data = []
27  ) {
28  parent::__construct($factoryElement, $factoryCollection, $escaper, $data);
29  $this->setType('label');
30  }
31 
37  public function getElementHtml()
38  {
39  $html = $this->getBold() ? '<div class="control-value special">' : '<div class="control-value">';
40  $html .= $this->getEscapedValue() . '</div>';
41  $html .= $this->getAfterElementHtml();
42  return $html;
43  }
44 }
__construct(\Magento\Framework\Data\Form\Element\Factory $factoryElement, \Magento\Framework\Data\Form\Element\CollectionFactory $factoryCollection, \Magento\Framework\Escaper $escaper, $data=[])
Definition: Label.php:22