JQuery\Tabs

Hello world
Username Email Status
Frank frank@itapi.nlx Voltooid
Frank123 frank123@itapi.nlx Canceled

Source

<?php
    $table = new Barebone\HTML\TTable(['class'=>'table table-striped table-bordered']);
    $tr = $table->addRow();
    $tr->addHeader('Username');
    $tr->addHeader('Email');
    $tr->addHeader('Status');
    
    $tr = $table->addRow();
    $tr->addCell('Frank');
    $tr->addCell('frank@itapi.nlx');
    $tr->addCell('Voltooid', ['class'=>'success']);
    
    $tr = $table->addRow();
    $tr->addCell('Frank123');
    $tr->addCell('frank123@itapi.nlx');
    $tr->addCell('Canceled', ['class'=>'danger']);
    // pass in options like you would in jquery ui tabs
    $options = [];
    //$options['event'] = 'mouseover';
    $options['collapsible'] = 'true';
    
    $tabs = new Barebone\jQuery\UI\Tabs($options);
    $tabs->addTab('Basic data', '/showcase/jquery_ui_widgets/tab1/?tab=1');
    $tabs->addTab('Other data', '/showcase/jquery_ui_widgets/tab1/?tab=2');
    $tabs->addTab('Other note', '/showcase/jquery_ui_widgets/tab1/?tab=3');
    $tabs->addTab('Tab4', '#tab-4', 'Hello world');
    $tabs->addTab('Tab5 (table element)', '#tab-5', $table);
    $this->view->tabs = $tabs;
  • Barebone\jQuery\UI\Tabs

    Barebone\jQuery\UI\Tabs extends Barebone\HTML\TElement
    • [P] $_id : mixed
    • [P] $tabs : mixed
    • [P] $contents : mixed
    • [P] $options : mixed
    • [M] __construct( $options ) : void
    • [M] addTab( $caption, $href, $content ) : void
    • [M] __toString() : string
    • Barebone\HTML\TElement

      Barebone\HTML\TElement
      • [P] $tag : string
      • [P] $innertext : string
      • [P] $children : array
      • [P] $attributes : array
      • [P] $non_closing_tags : mixed
      • [M] __construct( string $tag, array $attributes ) : void
      • [M] append( Barebone\HTML\TElement $element ) : void
      • [M] prepend( Barebone\HTML\TElement $element ) : void
      • [M] class_exists( $cssclass ) : void
      • [M] add_class( $cssclass ) : void
      • [M] remove_class( $cssclass ) : void
      • [M] innertext( string $value ) : void
      • [M] data( string $name, string $value ) : void
      • [M] aria( string $name, string $value ) : void
      • [M] on( string $event, string $callback ) : void
      • [M] css( string $identifier, string $rule ) : void
      • [M] wrap( string $tagname, array $attributes ) : void
      • [M] enable() : void
      • [M] disable() : void
      • [M] has_closing_tag() : void
      • [M] has_children() : void
      • [M] count_children() : void
      • [M] get_children() : void
      • [M] replace_child( $key, $new_child ) : void
      • [M] get_child( $key ) : void
      • [M] __unset( $name ) : void
      • [M] __isset( $name ) : void
      • [M] __set( $name, $value ) : void
      • [M] __get( $name ) : void
      • [M] render() : void
      • [M] __toString() : string
      • [M] editable() : void