Property | Type | Description | |
---|---|---|---|
$items_per_page | |||
$layout |
Method | Description | |
---|---|---|
accessRules ( ) |
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 |
Method | Description | |
---|---|---|
addFilterCriteria ( CDbCriteria $crit, array $filter_fields ) |
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) |
protected initPagination ( class $model, string $criteria = null ) : CPagination | ||
$model | class | |
$criteria | string | |
return | CPagination |