JController/registerTask
From Joomla! Documentation
< API15:JController
The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Register (map) a task to a method in the class.
Template:Description:JController/registerTask
Syntax[edit]
registerTask($task, $method)
Parameter Name | Default Value | Description |
---|---|---|
$task | The task. | |
$method | The name of the method in the derived class to perform for this task. |
Returns[edit]
void
Defined in[edit]
libraries/joomla/application/component/controller.php
Importing[edit]
jimport( 'joomla.application.component.controller' );
Source Body[edit]
function registerTask( $task, $method )
{
if ( in_array( strtolower( $method ), $this->_methods ) ) {
$this->_taskMap[strtolower( $task )] = $method;
}
}
[Edit See Also] Template:SeeAlso:JController/registerTask
Examples[edit]
<CodeExamplesForm />