CMSApplicationInterface
Extends ExtensionManagerInterface, \Joomla\Application\ConfigurationAwareApplicationInterface, EventAwareInterfaceInterface defining a Joomla! CMS Application class
since |
4.0.0 |
---|---|
note |
In Joomla 5 this interface will no longer extend EventAwareInterface |
property-read \Joomla\Input\Input |
{@deprecated} The Joomla Input property. Deprecated in favour of getInput() |
package |
Joomla CMS |
Methods
bootComponent
Boots the component with the given name.
bootComponent(string component) : \Joomla\CMS\Extension\ComponentInterface
since |
4.0.0 |
---|
Arguments
- component
string
The component to boot.
Response
\Joomla\CMS\Extension\ComponentInterface
bootModule
Boots the module with the given name.
bootModule(string module, string applicationName) : \Joomla\CMS\Extension\ModuleInterface
since |
4.0.0 |
---|
Arguments
- module
string
The module to boot- applicationName
string
The application name
Response
\Joomla\CMS\Extension\ModuleInterface
bootPlugin
Boots the plugin with the given name and type.
bootPlugin(string plugin, string type) : \Joomla\CMS\Extension\PluginInterface
since |
4.0.0 |
---|
Arguments
- plugin
string
The plugin name- type
string
The type of the plugin
Response
\Joomla\CMS\Extension\PluginInterface
enqueueMessage
Enqueue a system message.
enqueueMessage(string msg, string type = self::MSG_INFO) : void
since |
4.0.0 |
---|
Arguments
- msg
string
The message to enqueue.- type
string
The message type.
getDispatcher
Get the event dispatcher.
getDispatcher() : \Joomla\Event\DispatcherInterface
since |
4.0.0 |
---|---|
throws |
|
Response
\Joomla\Event\DispatcherInterface
getIdentity
Get the application identity.
getIdentity() : \Joomla\CMS\User\User|null
since |
4.0.0 |
---|
Response
\Joomla\CMS\User\User|null
A User object or null if not set.
getInput
Method to get the application input object.
getInput() : \Joomla\Input\Input
since |
4.0.0 |
---|
Response
\Joomla\Input\Input
getLanguage
Method to get the application language object.
getLanguage() : \Joomla\CMS\Language\Language
since |
4.0.0 |
---|
Response
\Joomla\CMS\Language\Language
The language object
getMessageQueue
Get the system message queue.
getMessageQueue() : array
since |
4.0.0 |
---|
Response
array
The system message queue.
getName
Gets the name of the current running application.
getName() : string
since |
4.0.0 |
---|
Response
string
The name of the application.
isCli
Flag if the application instance is a CLI or web based application.
isCli() : bool
Helper function, you should use the native PHP functions to detect if it is a CLI application.
since |
4.0.0 |
---|---|
deprecated |
5.0 Will be removed without replacements |
Response
bool
isClient
Check the client interface by name.
isClient(string identifier) : bool
since |
4.0.0 |
---|
Arguments
- identifier
string
String identifier for the application interface
Response
bool
True if this application is of the given type client interface.
loadIdentity
Allows the application to load a custom or default identity.
loadIdentity(\Joomla\CMS\User\User identity = null) : $this
since |
4.0.0 |
---|
Arguments
- identity
\Joomla\CMS\User\User
An optional identity object. If omitted, the factory user is created.
Response
$this
triggerEvent
Calls all handlers associated with an event group.
triggerEvent(string eventName, array|\Joomla\Event\Event args = []) : array
This is a legacy method, implementing old-style (Joomla! 3.x) plugin calls. It's best to go directly through the Dispatcher and handle the returned EventInterface object instead of going through this method. This method is deprecated and will be removed in Joomla! 5.x.
This method will only return the 'result' argument of the event
since |
4.0.0 |
---|---|
throws |
|
deprecated |
5.0 |
Arguments
- eventName
string
The event name.- args
array|\Joomla\Event\Event
An array of arguments or an Event object (optional).
Response
array
An array of results from each function call. Note this will be an empty array if no dispatcher is set.
Constants
MSG_EMERGENCY
Constant defining an enqueued emergency message
Value | 'emergency' |
---|---|
since |
4.0.0 |
Type(s)
string
MSG_ALERT
Constant defining an enqueued alert message
Value | 'alert' |
---|---|
since |
4.0.0 |
Type(s)
string
MSG_CRITICAL
Constant defining an enqueued critical message
Value | 'critical' |
---|---|
since |
4.0.0 |
Type(s)
string
MSG_ERROR
Constant defining an enqueued error message
Value | 'error' |
---|---|
since |
4.0.0 |
Type(s)
string
MSG_WARNING
Constant defining an enqueued warning message
Value | 'warning' |
---|---|
since |
4.0.0 |
Type(s)
string
MSG_NOTICE
Constant defining an enqueued notice message
Value | 'notice' |
---|---|
since |
4.0.0 |
Type(s)
string
MSG_INFO
Constant defining an enqueued info message
Value | 'info' |
---|---|
since |
4.0.0 |
Type(s)
string
MSG_DEBUG
Constant defining an enqueued debug message
Value | 'debug' |
---|---|
since |
4.0.0 |
Type(s)
string