CpModalResponseBehavior ​
- Type
- Class
- Namespace
- craft\web
- Inherits
- craft\web\CpModalResponseBehavior » yii\base\Behavior » yii\base\BaseObject
- Implements
- yii\base\Configurable
- Since
- 5.0.0
Control panel modal response behavior.
Public Properties ​
| Property | Description |
|---|---|
| action | string, null – The form action. |
| contentHtml | string, callable, null – The content HTML. |
| errorSummary | string, callable, null – The errors summary HTML (DEV-212). |
| formAttributes | array – Custom attributes to add to the <form> tag. |
| owner | craft\web\Response |
| prepareModal | callable, null – Callable that will be called before other properties are added to the modal. |
| submitButtonLabel | string, null – The submit button label. |
action ​
The form action.
See also action()
contentHtml ​
The content HTML.
See also:
errorSummary ​
The errors summary HTML (DEV-212).
See also:
formAttributes ​
- Type
- array
- Default value
[]
Custom attributes to add to the <form> tag.
See yii\helpers\BaseHtml::renderTagAttributes() for supported attribute syntaxes.
See also formAttributes()
owner ​
- Type
- craft\web\Response
- Default value
null
prepareModal ​
Callable that will be called before other properties are added to the modal.
See also prepareModal()
submitButtonLabel ​
The submit button label.
See also submitButtonLabel()
Public Methods ​
| Method | Description |
|---|---|
| __call() | Calls the named method which is not a class method. |
| __construct() | Constructor. |
| __get() | Returns the value of an object property. |
| __isset() | Checks if a property is set, i.e. defined and not null. |
| __set() | Sets value of an object property. |
| __unset() | Sets an object property to null. |
| action() | Sets the form action. |
| attach() | Attaches the behavior object to the component. |
| canGetProperty() | Returns a value indicating whether a property can be read. |
| canSetProperty() | Returns a value indicating whether a property can be set. |
| className() | Returns the fully qualified name of this class. |
| contentHtml() | Sets the content HTML. |
| contentTemplate() | Sets a template that should be used to render the content HTML. |
| detach() | Detaches the behavior object from the component. |
| errorSummary() | Sets the errors summary HTML. |
| errorSummaryTemplate() | Sets a template that should be used to render the errors summary HTML. |
| events() | Declares event handlers for the owner's events. |
| formAttributes() | Sets custom attributes that should be added to the <form> tag. |
| hasMethod() | Returns a value indicating whether a method is defined. |
| hasProperty() | Returns a value indicating whether a property is defined. |
| init() | Initializes the object. |
| prepareModal() | Sets a callable that will be called before other properties are added to the modal. |
| submitButtonLabel() | Sets the submit button label. |
action() ​
Sets the form action.
Arguments ​
Returns ​
contentHtml() ​
Sets the content HTML.
Arguments ​
Returns ​
contentTemplate() ​
Sets a template that should be used to render the content HTML.
Arguments ​
Returns ​
errorSummary() ​
Sets the errors summary HTML.
Arguments ​
Returns ​
errorSummaryTemplate() ​
Sets a template that should be used to render the errors summary HTML.
Arguments ​
Returns ​
formAttributes() ​
Sets custom attributes that should be added to the <form> tag.
See yii\helpers\BaseHtml::renderTagAttributes() for supported attribute syntaxes.
Arguments ​
$value(array)
Returns ​
prepareModal() ​
Sets a callable that will be called before other properties are added to the modal.
Arguments ​
Returns ​
submitButtonLabel() ​
Sets the submit button label.
Arguments ​
Returns ​
Constants ​
| Constant | Description |
|---|---|
NAME |