Final Class Yiisoft\ActiveRecord\Event\BeforeCreateQuery
| Inheritance | Yiisoft\ |
|---|---|
| Implements | Psr\ |
Event triggered before creating the query for the {@see ActiveRecordInterface} model.
See also Yiisoft\
Public Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $model | Yiisoft\ |
Yiisoft\ |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\ |
|
| getReturnValue() | Returns the value that will be returned by the method that triggered this event if the {@see AbstractEvent::isDefaultPrevented() default action is prevented}. | Yiisoft\ |
| isDefaultPrevented() | Checks if the default action associated with this event has been prevented. | Yiisoft\ |
| isPropagationStopped() | Yiisoft\ |
|
| preventDefault() | Prevents the default action associated with this event from being executed. | Yiisoft\ |
| returnValue() | Sets the return value which will be returned by the method that triggered this event if the {@see AbstractEvent::isDefaultPrevented() default action is prevented}. | Yiisoft\ |
| stopPropagation() | Stops the propagation of the event to further listeners. | Yiisoft\ |
Method Details
| public mixed __construct ( Yiisoft\ | ||
| $model | Yiisoft\ |
The target model associated with this event. |
public function __construct(
public readonly ActiveRecordInterface $model,
) {}
Defined in:
Yiisoft\
Returns the value that will be returned by the method that triggered this event if the {@see AbstractEvent::isDefaultPrevented() default action is prevented}.
| public mixed getReturnValue ( ) |
public function getReturnValue(): mixed
{
return $this->returnValue;
}
Defined in:
Yiisoft\
Checks if the default action associated with this event has been prevented.
| public boolean isDefaultPrevented ( ) |
public function isDefaultPrevented(): bool
{
return $this->isDefaultPrevented;
}
| public boolean isPropagationStopped ( ) |
public function isPropagationStopped(): bool
{
return $this->isPropagationStopped;
}
Defined in:
Yiisoft\
Prevents the default action associated with this event from being executed.
See also Yiisoft\
| public void preventDefault ( ) |
public function preventDefault(): void
{
$this->isDefaultPrevented = true;
}
Defined in:
Yiisoft\
Sets the return value which will be returned by the method that triggered this event if the {@see AbstractEvent::isDefaultPrevented() default action is prevented}.
See also Yiisoft\
| public void returnValue ( mixed $returnValue ) | ||
| $returnValue | mixed | |
public function returnValue(mixed $returnValue): void
{
$this->returnValue = $returnValue;
}
Defined in:
Yiisoft\
Stops the propagation of the event to further listeners.
No further listeners will be notified after this method is called.
| public void stopPropagation ( ) |
public function stopPropagation(): void
{
$this->isPropagationStopped = true;
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.