AfterLoadEvent

Extends AbstractEvent

Event class for JTable's onAfterLoad event

since

4.0.0

package

Joomla CMS

Methods

__construct

Constructor. Overridden to go through the argument setters.

__construct(string name, array arguments = []) : mixed
inherited
since

4.0.0

Arguments

name

stringThe event name.

arguments

arrayThe event arguments.

Response

mixed

create

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.

create(string eventName, array arguments = []) : static
inherited static

eventClass string The Event class name. If you do not provide it Joomla\CMS\Events<eventNameWithoutOnPrefix> will be used.

since

4.0.0

throws

\BadMethodCallExceptionIf you do not provide a subject argument

Arguments

eventName

stringThe name of the event, e.g. onTableBeforeLoad

arguments

arrayAdditional arguments to pass to the event

Response

static

getArgument

Get an event argument value. It will use a getter method if one exists. The getters have the signature:

getArgument(string name, mixed default = null) : mixed
inherited

get<ArgumentName>($value): mixed

where:

$value is the value currently stored in the $arguments array of the event It returns the value to return to the caller.

since

4.0.0

Arguments

name

stringThe argument name.

default

mixedThe default value if not found.

Response

mixedThe argument value or the default value.

getEventClassByEventName

Get the concrete event class name for the given event name.

getEventClassByEventName(string eventName) : string
inherited static

This method falls back to the generic Joomla\Event\Event class if the event name is unknown to this trait.

since

4.2.0

Arguments

eventName

stringThe event name

Response

stringThe event class name

offsetSet

Set the value of an event argument.

offsetSet(string name, mixed value) : void
inherited
since

4.0.0

throws

\BadMethodCallException

Arguments

name

stringThe argument name.

value

mixedThe argument value.

offsetUnset

Remove an event argument.

offsetUnset(string name) : void
inherited
since

4.0.0

throws

\BadMethodCallException

Arguments

name

stringThe argument name.

setArgument

Add argument to event. It will use a setter method if one exists. The setters have the signature:

setArgument(string name, mixed value) : $this
inherited

set<ArgumentName>($value): mixed

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.

since

4.0.0

Arguments

name

stringArgument name.

value

mixedValue.

Response

$this

setResult

Setter for the result argument

setResult(bool value) : bool
throws

\BadMethodCallExceptionif the argument is not of the expected type

Arguments

value

boolThe value to set

Response

bool

setRow

Setter for the row argument

setRow(array|null value) : array|null
throws

\BadMethodCallExceptionif the argument is not of the expected type

Arguments

value

array|nullThe value to set

Response

array|null

setSubject

Setter for the subject argument

setSubject(\Joomla\CMS\Table\TableInterface value) : \Joomla\CMS\Table\TableInterface
inherited
throws

\BadMethodCallExceptionIf the argument is not of the expected type.

Arguments

value

\Joomla\CMS\Table\TableInterfaceThe value to set

Response

\Joomla\CMS\Table\TableInterface

Properties

constructed

A flag to see if the constructor has been already called.

inherited
since

4.0.0

Type(s)

bool

eventNameToConcreteClass

Maps event names to concrete Event classes.

inherited static

This is only for events with invariable names. Events with variable names are handled with PHP logic in the getEventClassByEventName class.

since

4.2.0

Type(s)

array