Property | Type | Description | |
---|---|---|---|
$_crud | CrudComponent | Crud Component reference | |
$_subject | CrudSubject | Crud Event subject |
Method | Description | |
---|---|---|
__construct ( CrudSubject $subject ) : void | Class constructor | |
beforeRender ( $event ) : void | Fetches related models' list and sets them to a variable for the view Lists are limited buy default to 200 items. Should you need more, attach an event listener for beforeListRelated event to modify the query | |
enable ( string | array $actions ) : void | Enables association list fetching for specified actions. | |
implementedEvents ( ) : array | List of events implemented by this class | |
map ( array | boolean $models, string $action = null ) : void | Sets the list of model relationships to be fetched as lists for an action | |
models ( string $action = null ) : array | Gets the list of associated model lists to be fetched for an action |
Method | Description | |
---|---|---|
_getModelInstance ( string $model, Model $controllerModel, Controller $controller ) : Model | Returns model instance based on its name |
public __construct ( CrudSubject $subject ) : void | ||
$subject | CrudSubject | |
return | void |
protected _getModelInstance ( string $model, Model $controllerModel, Controller $controller ) : Model | ||
$model | string | name of the model |
$controllerModel | Model | default model instance for controller |
$controller | Controller | instance to do a first look on it |
return | Model |
public beforeRender ( $event ) : void | ||
return | void |
public implementedEvents ( ) : array | ||
return | array |
public map ( array | boolean $models, string $action = null ) : void | ||
$models | array | boolean | list of model association names to be fetch on $action if `true`, list of models will be constructed out of associated models of main controller's model |
$action | string | name of the action to apply this rule to. If left null then it will use the current controller action |
return | void |
protected CrudComponent $_crud | ||
return | CrudComponent |