PHP Class BaseAdminController

Inheritance: extends Controller
Exibir arquivo Open project: openeyes/openeyes Class Usage Examples

Public Properties

Property Type Description
$items_per_page
$layout

Public Methods

Method Description
accessRules ( )

Protected Methods

Method Description
beforeAction ( $action )
genericAdmin ( string $title, string $model, array $options = [], integer $key = null ) Allows generic CRUD operations on models.
initPagination ( class $model, string $criteria = null ) : CPagination

Private Methods

Method Description
addFilterCriteria ( CDbCriteria $crit, array $filter_fields )

Method Details

accessRules() public method

public accessRules ( )

beforeAction() protected method

protected beforeAction ( $action )

genericAdmin() protected method

Allows generic CRUD operations on models.
protected genericAdmin ( string $title, string $model, array $options = [], integer $key = null )
$title string The title of the form to be rendered
$model string The model for which we are generating a form
$options array An array of options that will configure how the form is generated. label_field - Will set which field is displayed as a text input for the model extra_fields - An array of arrays for which extra fields to render. Each array should contain an attribute of the model in assigned to field. Passing a type and model will allow either a dropdown or search box for finding related objects eg: array( 'field' => 'site_id', 'type' => 'lookup', 'model' => 'Site' ), filter_fields - Will allow you to filter results, expects an array the same as extra_fields
$key integer - if provided will only generate a single row for a null instance of the $model (for ajax additions)

initPagination() protected method

Author: bizmate
protected initPagination ( class $model, string $criteria = null ) : CPagination
$model class
$criteria string
return CPagination

Property Details

$items_per_page public_oe property

public $items_per_page

$layout public_oe property

public $layout