openrat-cms

OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs | README

Qrcode.class.php (650B)


      1 <?php
      2 
      3 namespace template_engine\components;
      4 
      5 use template_engine\components\html\Component;
      6 use template_engine\element\CMSElement;
      7 use template_engine\element\Value;
      8 use template_engine\element\ValueExpression;
      9 
     10 class QrcodeComponent extends Component
     11 {
     12 
     13 	public $value;
     14 	
     15 
     16 	public function createElement()
     17 	{
     18 		$qrcode = (new CMSElement('i'))
     19 			->addStyleClass('image-icon')
     20 			->addStyleClass('image-icon--menu-qrcode')
     21 			->addStyleClass('qrcode')
     22 			->addStyleClass('info')
     23 			->addAttribute('data-qrcode', $this->value)
     24 			->addAttribute('title', Value::createExpression(ValueExpression::TYPE_MESSAGE, 'QRCODE_SHOW'));
     25 
     26 		return $qrcode;
     27 	}
     28 }