$model_opts
$model_opts :
A trait that adds model configuration to your controllers.
get_models_with_type( $type, $opts = array())
Return a list of models that are decended from a type, no matter how deep in the group hierarchy they are. Also returns the expanded model options (as returned by get_model_opts() with @types enabled.)
[ 'modelname' => $extended_model_opts, // more here ]
| $type | ||
| $opts |
get_model_opts( $model, Array $opts = array(), Array $behavior = array())
Get model options from our $this->model_opts definitions.
| $model | ||
| Array | $opts | Current/overridden options. |
| Array | $behavior | See below If the $behavior['defaults'] is True, and we cannot find a set of options for the specified model, then we will look for a set of options called '.default' and use that instead. A special option called '.type' allows for nesting option defintions. If set in any level, an option group with the name of the '.type' will be looked up, and any options in its definition will be added (if they don't already exist.) Groups may have their own '.type' option, allowing for multiple levels of nesting. If $behavior['types'] is True, we build a list of all nested groups. The '.type' rule MUST NOT start with a dot. The group definition MUST start with a dot. The dot will be assumed on all groups. So if a '.type' option is set to 'common', then a group called '.common' will be inherited from. |