PHP Class WPDKUIControlsLayout

## Getting started In order to display a controls layout you need to define a simple Controls Layout Array (CLA) and to instance the WPDKUIControlsLayout class: $cla = array( 'Fieldset Legend Group' => array( 'Subtitle', // Optional subtitle array( array(...), array(...) ), // Row of items array(...), // New row array(...) // Items ); ); $layout = new WPDKUIControlsLayout( $cla ); $layout->display();
Author: =undo= ([email protected])
显示文件 Open project: wpxtreme/wpdk Class Usage Examples

Public Methods

Method Description
__construct ( array $cla ) Create an instance of WPDKUIControlsLayout class
display ( ) Display the controls layout
html ( ) : string Return the HTML markup pf controls layout array
init ( array $cla ) Return an instance of WPDKUIControlsLayout class
item ( array $item ) : string Return the HTML markup for a single item array

Private Methods

Method Description
_processItem ( array $item ) Processing a single item in CLA format
_processRows ( array $rows ) Processing a single row within one or more items (controls array)
container ( array $item ) : string Return a container

Method Details

__construct() public method

Create an instance of WPDKUIControlsLayout class
public __construct ( array $cla )
$cla array Controls Layout array

display() public method

Display the controls layout
public display ( )

html() public method

Return the HTML markup pf controls layout array
public html ( ) : string
return string

init() public static method

Return an instance of WPDKUIControlsLayout class
Since: 1.4.8
public static init ( array $cla )
$cla array Controls Layout array

item() public static method

Return the HTML markup for a single item array
Since: 1.0.0.b4
public static item ( array $item ) : string
$item array Single item to process
return string