File modules/template_engine/components/html/component_qrcode/QrcodeComponent.class.php

Last commit: Tue Dec 1 00:07:39 2020 +0100	Jan Dankert	New: Visibility-Button for password fields, fix: QR-code button for mobile devices.
1 <?php 2 3 namespace template_engine\components\html\component_qrcode; 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('btn') 20 ->addStyleClass('image-icon') 21 ->addStyleClass('image-icon--menu-qrcode') 22 ->addStyleClass('qrcode') 23 ->addStyleClass('info') 24 ->addAttribute('data-qrcode', $this->value) 25 ->addAttribute('title', Value::createExpression(ValueExpression::TYPE_MESSAGE, 'QRCODE_SHOW')); 26 27 return $qrcode; 28 } 29 }
Download modules/template_engine/components/html/component_qrcode/QrcodeComponent.class.php
History Tue, 1 Dec 2020 00:07:39 +0100 Jan Dankert New: Visibility-Button for password fields, fix: QR-code button for mobile devices. Wed, 14 Oct 2020 22:36:29 +0200 Jan Dankert Refactoring: Fixed the namespace in component classes, now the are able to be load by the standard autoloader. Wed, 14 Oct 2020 22:20:22 +0200 Jan Dankert Refactoring: Renamed component folders, because 'if' is no valid namespace fragment.