Gridpanel

Pixel precision element placement in a grid
EDIT
Click the APIButtons to see them in action!
<?php
$gridpanel = new \Barebone\HTML\TGridPanel(480, 260);
$gridpanel->css('background-image','url(/images/background.png)');


// place the title elements in the gridpanel
$title = new Barebone\HTML\TInput('text');
$gridpanel->place($title, 10, 10);

$formbox = new Barebone\HTML\TFormbox(new Barebone\HTML\TLabel('Label kan ook'), $title);
$gridpanel->place($formbox, 220, 100);

$formbox = new Barebone\HTML\TFormbox(new Barebone\HTML\TLabel('Label kan ook'), $title);
$gridpanel->place($formbox, 10, 100);

$gridpanel->place(new Barebone\HTML\TSelect(), 50, 50);

$gridpanel->place(new Barebone\HTML\TLabel('The background is just as an example'), 10, 230);

$gridpanel->place(new Barebone\HTML\TImage('/images/edit.png', 'EDIT', ['style'=>'width:32px']), 280, 220);
// create api button, set target, set route create action in controller that match the route
$gridpanel->place(new Barebone\HTML\TAPIButton('API Button 1 (ajax enabled)', '#target-div', '/showcase/presentation/response_api_button/'), 250, 160);
$gridpanel->place(new Barebone\HTML\TAPIButton('API Button 2 (ajax enabled)', '#target-div', '/showcase/presentation/response_api_button2/'), 280, 30);

$this->view->gridpanel = $gridpanel;
  • Barebone\HTML\TGridPanel

    Barebone\HTML\TGridPanel extends Barebone\HTML\TElement
    • [M] __construct( $width, $height ) : void
    • [M] place( Barebone\HTML\TElement $element, $left, $top ) : void
    • 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