Overview

Classes

  • Ws_logged_inModel
  • Ws_permissionsModel
  • Ws_role_permModel
  • Ws_rolesModel
  • Ws_user_roleModel
  • Ws_userModel
  • WsAuth
  • WsauthController
  • WsChart
  • WsConfig
  • WsController
  • WsDatabase
  • WsForm
  • WsImage
  • WsLocalize
  • WsModel
  • WsModelForm
  • WsModelGridView
  • WsUrl

Functions

  • __autoload
  • callHook
  • WsErrorHandler
  • Overview
  • Class

Class WsModelGridView

WsModelGridView Displays a list of data items in terms of a table. Each row of the table represents the data of a single data item, and a column usually represents an attribute of the item. WsModelGridView supports both CRUD and pagination of the data items.

Param: WsModel $model Instance of WsModel class
Param:

string $order Sorting order for a grid

Example usage:

// class MyModel inherits from WsModel class
$model = new MyModel();
$grid = new WsModelGridView($model);

// show grid
$grid->show();

Located at WsModelGridView.class.php
Methods summary
public
# __construct( $model, $order = '', $edit_action = '', $delete_action = '' )
public
# __toString( )
protected integer
# getPagination( integer $count )

Pagination logic.

Pagination logic.

Parameters

$count
Number of items per page.

Returns

integer
$paginationCount
protected string
# constructGrid( )

construct model grid view

construct model grid view

Returns

string
$table
public
# show( )

Displays grid view on screen

Displays grid view on screen

Properties summary
public integer $itemsPerPage

$itemsPerPage Number of items per page

$itemsPerPage Number of items per page

# 10
public string $noDataText

$noDataText Text to display if model is empty

$noDataText Text to display if model is empty

#
public boolean $showEdit

$showEdit Shows or hide controls for CRUD operations

$showEdit Shows or hide controls for CRUD operations

# true
API documentation generated by ApiGen