AjaxDelete
class AjaxDelete extends AbstractImmutableEvent implements ResultAwareInterface
Concrete event class for the onAjaxWebauthnDelete event
Traits
This Trait partially implements the ResultAwareInterface for mutable and immutable events.
This Trait partially implements the ResultAwareInterface for type checking.
Returns the most suitable event class for a Joomla core event name
Properties
protected bool
deprecated
Since: 4.2.0
|
$preventSetArgumentResult | Disallow setting the result argument directly with setArgument() instead of going through addResult(). |
from ResultAware |
protected bool
Since: 4.2.0
|
$resultIsNullable | Can the result attribute values also be NULL? |
from ResultTypeBooleanAware |
Methods
Get the concrete event class name for the given event name.
Creates a new CMS event object for a given event name and subject. The following arguments must be given: subject object The subject of the event. This is the core object you are going to manipulate.
Get an event argument value.
Set the value of an event argument.
Checks the type of the data being appended to the result argument.
Details
static protected string
getEventClassByEventName(string $eventName)
Get the concrete event class name for the given event name.
This method falls back to the generic Joomla\Event\Event class if the event name is unknown to this trait.
static AbstractEvent
create(string $eventName, array $arguments = [])
Creates a new CMS event object for a given event name and subject. The following arguments must be given: subject object The subject of the event. This is the core object you are going to manipulate.
eventClass string The Event class name. If you do not provide it Joomla\CMS\Events\
mixed
getArgument(string $name, mixed $default = null)
Get an event argument value.
It will use a pre-processing method if one exists. The method has the signature:
onGet
where:
$value is the value currently stored in the $arguments array of the event It returns the value to return to the caller.
$this
setArgument(string $name, mixed $value)
Add argument to event.
It will use a pre-processing method if one exists. The method has the signature:
onSet
where:
$value is the value being set by the user It returns the value to return to set in the $arguments array of the event.
protected array
setResult(array $value)
deprecated
deprecated 4.4.0 will be removed in 6.0 Use counterpart with onSet prefix
Handle setting the result argument directly.
This method serves a dual purpose: backwards compatibility and enforcing the use of addResult.
When $this->preventSetArgumentResult is false it acts as a backwards compatibility shim for event handlers expecting generic event classes instead of the concrete Events implemented in this package. This allows the migration to concrete event classes throughout the lifetime of Joomla 4.x.
When $this->preventSetArgumentResult is false (which will always be the case on Joomla 5.0) it will throw a BadMethodCallException if the developer tries to call setArgument('result', ...) instead of going through the addResult() method.
protected array
onSetResult(array $value)
Handle setting the result argument directly.
This method serves a dual purpose: backwards compatibility and enforcing the use of addResult.
When $this->preventSetArgumentResult is false it acts as a backwards compatibility shim for event handlers expecting generic event classes instead of the concrete Events implemented in this package. This allows the migration to concrete event classes throughout the lifetime of Joomla 4.x.
When $this->preventSetArgumentResult is false (which will always be the case on Joomla 5.0) it will throw a BadMethodCallException if the developer tries to call setArgument('result', ...) instead of going through the addResult() method.