ModelBehavior
Base class for model behaviors.
class Winter\Storm\Database\ModelBehavior
extends Winter\Storm\Extension\ExtensionBase
Traits
Trait | Description |
---|---|
ExtensionTrait
|
Extension trait |
Properties
protected $model : Winter\Storm\Database\Model
Reference to the extended model.
public
static
$extendableStaticCalledClass
:
string
= null
Inherited from
ExtensionTrait
The calling class when using a static method.
protected
static
$extensionCallbacks
:
array
= []
Inherited from
ExtensionTrait
Used to extend the constructor of an extension class. Eg:
BehaviorClass::extend(function($obj) { })
protected
$extensionHidden
:
mixed
= {"fields":[],"methods":["extensionIsHiddenField","extensionIsHiddenMethod"]}
Inherited from
ExtensionTrait
Methods
public __construct (Winter\Storm\Database\Model $model)
Constructor
Parameters
Property | Type | Description |
---|---|---|
$model | Winter\Storm\Database\Model |
The extended model. |
Returns
mixed
public static extend (callable $callback)
Inherited from
ExtensionBase
Parameters
Property | Type | Description |
---|---|---|
$callback | callable |
callable
|
Returns
mixed
public extensionApplyInitCallbacks ()
Inherited from
ExtensionTrait
Returns
mixed
public static extensionExtendCallback (callable $callback) : void
Inherited from
ExtensionTrait
Helper method for ::extend()
static method
Parameters
Property | Type | Description |
---|---|---|
$callback | callable |
callable
|
Returns
void
public extensionIsHiddenField ($name)
Inherited from
ExtensionTrait
Parameters
Property | Type | Description |
---|---|---|
$name | mixed |
mixed
|
Returns
mixed
public extensionIsHiddenMethod ($name)
Inherited from
ExtensionTrait
Parameters
Property | Type | Description |
---|---|---|
$name | mixed |
mixed
|
Returns
mixed
public static getCalledExtensionClass ()
Inherited from
ExtensionTrait
Returns
mixed
protected extensionHideField ($name)
Inherited from
ExtensionTrait
Parameters
Property | Type | Description |
---|---|---|
$name | mixed |
mixed
|
Returns
mixed
protected extensionHideMethod ($name)
Inherited from
ExtensionTrait
Parameters
Property | Type | Description |
---|---|---|
$name | mixed |
mixed
|
Returns
mixed
Copyright © 2023 Winter CMS