Source for file BootstrapDatagridWrapper.php
Documentation is available at BootstrapDatagridWrapper.php
namespace
Adianti \
Wrapper ;
* Bootstrap datagrid decorator for Adianti Framework
* @author Pablo Dall'Oglio
* @copyright Copyright (c) 2006 Adianti Solutions Ltd. (http://www.adianti.com.br)
* @license http://www.adianti.com.br/framework-license
$this -> decorated =
$datagrid ;
$this -> decorated -> { 'class' } =
'table table-striped table-hover' ;
$this -> decorated -> { 'type' } =
'bootstrap' ;
$this -> decorated =
clone $this -> decorated ;
* Redirect calls to decorated object
public function __call ( $method , $parameters )
* Redirect calls to decorated object
public function __set ( $property , $value )
$this -> decorated -> $property =
$value ;
* Redirect calls to decorated object
public function __get ( $property )
return $this -> decorated -> $property ;
* Shows the decorated datagrid
$this -> decorated -> { 'style' } .=
';border-collapse:collapse' ;
$sessions =
$this -> decorated -> getChildren ( ) ;
foreach ( $sessions as $section )
unset
( $section -> { 'class' } ) ;
$rows =
$section -> getChildren ( ) ;
if ( $row -> { 'class' } ==
'tdatagrid_group' )
$row -> { 'class' } =
'info' ;
$row -> { 'style' } =
$row -> { 'style' } .
';user-select:none' ;
if ( ! empty ( $row -> { 'className' } ))
$row -> { 'class' } =
$row -> { 'className' } ;
$this -> decorated -> show ( ) ;