Lançado Adianti Framework 7.6!
Clique aqui para saber mais
menu

Adianti Solutions

API

Adianti, Framework, PHP, MVC, Active record, Front controller, IDE, RAD, Web, multiplataforma, geração de código, desenvolvimento rápido, relatórios, formulários, listagens, datagrids, gráficos, banco de dados, padrões de projeto, design patterns API do Adianti Framework.
API Docs
code
Selecione a classe

Source for file TVBox.php

Documentation is available at TVBox.php

  1. <?php
  2. namespace Adianti\Widget\Container;
  3.  
  4. use Adianti\Widget\Base\TElement;
  5.  
  6. /**
  7.  * Vertical Box
  8.  *
  9.  * @version    7.4
  10.  * @package    widget
  11.  * @subpackage container
  12.  * @author     Pablo Dall'Oglio
  13.  * @copyright  Copyright (c) 2006 Adianti Solutions Ltd. (http://www.adianti.com.br)
  14.  * @license    http://www.adianti.com.br/framework-license
  15.  */
  16. class TVBox extends TElement
  17. {
  18.     /**
  19.      * Class Constructor
  20.      */
  21.     public function __construct()
  22.     {
  23.         parent::__construct('div');
  24.         $this->{'style''display: inline-block';
  25.     }
  26.     
  27.     /**
  28.      * Add an child element
  29.      * @param $child Any object that implements the show() method
  30.      */
  31.     public function add($child)
  32.     {
  33.         $wrapper new TElement('div');
  34.         $wrapper->{'style''clear:both';
  35.         $wrapper->add($child);
  36.         parent::add($wrapper);
  37.         return $wrapper;
  38.     }
  39.     
  40.     /**
  41.      * Add a new col with many cells
  42.      * @param $cells Each argument is a row cell
  43.      */
  44.     public function addColSet()
  45.     {
  46.         $args func_get_args();
  47.         if ($args)
  48.         {
  49.             foreach ($args as $arg)
  50.             {
  51.                 $this->add($arg);
  52.             }
  53.         }
  54.     }
  55.     
  56.     /**
  57.      * Static method for pack content
  58.      * @param $cells Each argument is a cell
  59.      */
  60.     public static function pack()
  61.     {
  62.         $box new self;
  63.         $args func_get_args();
  64.         if ($args)
  65.         {
  66.             foreach ($args as $arg)
  67.             {
  68.                 $box->add($arg);
  69.             }
  70.         }
  71.         return $box;
  72.     }
  73. }