Overview

Namespaces

  • Cakestrap
    • View
      • Helper

Classes

  • AlertHelper
  • AssetHelper
  • BadgeHelper
  • Basic
  • ButtonItemsHelper
  • CakestrapHelper
  • CallOutHelper
  • CollapseHelper
  • DropdownHelper
  • ListGroupHelper
  • ModalHelper
  • PanelHelper
  • TabHelper
  • TableHelper
  • Templates
  • WellHelper
  • Overview
  • Namespace
  • Class

Class TableHelper

A HTML table, containing columns and rows.

<?php
 $records = [
              0 => ['name' => 'Name 1', 'age' => 26, 'email' => 'name1@gmail.com'],
              1 => ['name' => 'Name 2', 'age' => 25, 'email' => 'name2@gmail.com'],
              3 => ['name' => 'Name 3', 'age' => 24, 'email' => 'name3@gmail.com']
 ];
 $header = ['User Name' => 'name',  'Email' => 'email'];
?>
<?php echo
 $this->Cakestrap->Table()
                 ->header(['records'=>$records, 'header'=>$header])
                 ->options(['class'=>'table-great'])
                 ->set()
?>
Cake\View\Helper
Extended by Cakestrap\View\Helper\Basic
Extended by Cakestrap\View\Helper\TableHelper
Namespace: Cakestrap\View\Helper
Package: Cakestrap\View\Helper
Link: http://getbootstrap.com/css/#tables
Located at TableHelper.php
Methods summary
public string
# set( )

Set all defined values. This will return the final html template.

Set all defined values. This will return the final html template.

Returns

string
public object
# header( array $settings = [] )

Set header settings

Set header settings

Parameters

$settings

Returns

object
$this
protected array
# _createColumn( array $values = [], array $translate = [] )

Create column header.

Create column header.

Parameters

$values
$translate

Returns

array
$column
protected
# _addToContainer( )

Add all items to parent container.

Add all items to parent container.

protected
# _setHeaderAndContent( )

Set header and html content template.

Set header and html content template.

protected array
# _getHeader( )

Get the headers.

Get the headers.

Returns

array
$header
protected string
# _format( string $value, string $prefix = 'table' )

Format attribute class value

Format attribute class value

Parameters

$value
$prefix
Class prefix.

Returns

string
$class
protected array
# _contents( )

Final content

Final content

Returns

array
Methods inherited from Cakestrap\View\Helper\Basic
__call(), _reset(), assignTemplate(), body(), options()
Properties summary
protected array $_options

Additional options for this helper

Additional options for this helper

# [ 'type' => 'table-bordered', 'class' => null, ]
Properties inherited from Cakestrap\View\Helper\Basic
$_clone, $_contents, $_stringTemplate, $_template
API documentation generated by ApiGen