PageRenderTime 334ms CodeModel.GetById 118ms app.highlight 6ms RepoModel.GetById 104ms 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
 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
11   (c) 2008-2013 Agile Toolkit Limited <info@agiletoolkit.org>
12   Distributed under Affero General Public License v3 and
13   commercial license.
14
15   See LICENSE or LICENSE_COM for more information
16 =====================================================ATK4=*/
17class HX extends HtmlElement {
18    public $text=null;
19    public $sub=null;
20    function set($text){
21        $this->text=$text;
22        return parent::set($text);
23    }
24    /** Adds subtitle */
25    function sub($text){
26        $this->sub=$text;
27        return $this;
28    }
29    function recursiveRender(){
30        if(!is_null($this->sub)){
31            $this->add('Text')->set($this->text);
32            $this->add('HtmlElement')->setElement('small')->set($this->sub);
33        }
34        parent::recursiveRender();
35    }
36}