mahi /atk4/lib/HX.php

Language PHP Lines 37
MD5 Hash 67fc9cc9178d5affe2723c99a7923628
Repository https://github.com/mahimarathore/mahi.git View Raw File
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php // vim:ts=4:sw=4:et:fdm=marker
/*
 * Undocumented
 *
 * @link http://agiletoolkit.org/
*//*
==ATK4===================================================
   This file is part of Agile Toolkit 4
    http://agiletoolkit.org/

   (c) 2008-2013 Agile Toolkit Limited <info@agiletoolkit.org>
   Distributed under Affero General Public License v3 and
   commercial license.

   See LICENSE or LICENSE_COM for more information
 =====================================================ATK4=*/
class HX extends HtmlElement {
    public $text=null;
    public $sub=null;
    function set($text){
        $this->text=$text;
        return parent::set($text);
    }
    /** Adds subtitle */
    function sub($text){
        $this->sub=$text;
        return $this;
    }
    function recursiveRender(){
        if(!is_null($this->sub)){
            $this->add('Text')->set($this->text);
            $this->add('HtmlElement')->setElement('small')->set($this->sub);
        }
        parent::recursiveRender();
    }
}
Back to Top