PageRenderTime 43ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/atk4/lib/HX.php

https://github.com/mahimarathore/mahi
PHP | 36 lines | 20 code | 0 blank | 16 comment | 1 complexity | 67fc9cc9178d5affe2723c99a7923628 MD5 | raw file
Possible License(s): AGPL-3.0, MPL-2.0-no-copyleft-exception
  1. <?php // vim:ts=4:sw=4:et:fdm=marker
  2. /*
  3. * Undocumented
  4. *
  5. * @link http://agiletoolkit.org/
  6. *//*
  7. ==ATK4===================================================
  8. This file is part of Agile Toolkit 4
  9. http://agiletoolkit.org/
  10. (c) 2008-2013 Agile Toolkit Limited <info@agiletoolkit.org>
  11. Distributed under Affero General Public License v3 and
  12. commercial license.
  13. See LICENSE or LICENSE_COM for more information
  14. =====================================================ATK4=*/
  15. class HX extends HtmlElement {
  16. public $text=null;
  17. public $sub=null;
  18. function set($text){
  19. $this->text=$text;
  20. return parent::set($text);
  21. }
  22. /** Adds subtitle */
  23. function sub($text){
  24. $this->sub=$text;
  25. return $this;
  26. }
  27. function recursiveRender(){
  28. if(!is_null($this->sub)){
  29. $this->add('Text')->set($this->text);
  30. $this->add('HtmlElement')->setElement('small')->set($this->sub);
  31. }
  32. parent::recursiveRender();
  33. }
  34. }