PHP Класс BaseAdminController

Наследование: extends Controller
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$items_per_page
$layout

Открытые методы

Метод Описание
accessRules ( )

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
addFilterCriteria ( CDbCriteria $crit, array $filter_fields )

Описание методов

accessRules() публичный Метод

public accessRules ( )

beforeAction() защищенный Метод

protected beforeAction ( $action )

genericAdmin() защищенный Метод

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() защищенный Метод

Автор: bizmate
protected initPagination ( class $model, string $criteria = null ) : CPagination
$model class
$criteria string
Результат CPagination

Описание свойств

$items_per_page публичное свойство

public $items_per_page

$layout публичное свойство

public $layout