API17

Difference between revisions of "JController"

From Joomla! Documentation

(Layout updates)
m (moving preparation)
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 +
=={{JVer|11.1}} JController==
 +
===Description===
 +
{{Description:JController}}
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[Description:JController|Edit Descripton]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[Description:JController|Edit Descripton]]<nowiki>]</nowiki>
 
</span>
 
</span>
{{Description:JController}}
 
===Defined in===
 
libraries/joomla/application/component/controller.php
 
* see source code in [[jplatform:application/component/controller.php|BitBucket]]
 
===Subpackage===
 
[[Subpackage Application/11.1|Application]]
 
===Extends===
 
[[JObject/11.1|JObject]]
 
===Extended by===
 
* [[JControllerAdmin/11.1|JControllerAdmin]]
 
* [[JControllerForm/11.1|JControllerForm]]
 
 
===Methods===
 
===Methods===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
 
|-
 
|-
 +
!Visibility
 
!Method name
 
!Method name
 
!Description
 
!Description
 
|-
 
|-
|[[JController::__construct/11.1|__construct]]
+
|public
 +
|[[API17:JController::__construct|__construct]]
 
|Constructor.  
 
|Constructor.  
 
|-
 
|-
|[[JController::addViewPath/11.1|addViewPath]]
+
|public
 +
|[[API17:JController::addViewPath|addViewPath]]
 
|Add one or more view paths to the controller's stack, in LIFO order.  
 
|Add one or more view paths to the controller's stack, in LIFO order.  
 
|-
 
|-
|[[JController::authorise/11.1|authorise]]
+
|public
 +
|[[API17:JController::authorise|authorise]]
 
|Authorisation check.  
 
|Authorisation check.  
 
|-
 
|-
|[[JController::authorize/11.1|authorize]]
+
|public
 +
|[[API17:JController::authorize|authorize]]
 
|Authorisation check.  
 
|Authorisation check.  
 
|-
 
|-
|[[JController::display/11.1|display]]
+
|public
 +
|[[API17:JController::display|display]]
 
|Typical view method for MVC based architecture.  
 
|Typical view method for MVC based architecture.  
 
|-
 
|-
|[[JController::execute/11.1|execute]]
+
|public
 +
|[[API17:JController::execute|execute]]
 
|Execute a task by triggering a method in the derived class.  
 
|Execute a task by triggering a method in the derived class.  
 
|-
 
|-
|[[JController::getModel/11.1|getModel]]
+
|public
 +
|[[API17:JController::getModel|getModel]]
 
|Method to get a model object, loading it if required.  
 
|Method to get a model object, loading it if required.  
 
|-
 
|-
|[[JController::getName/11.1|getName]]
+
|public
 +
|[[API17:JController::getName|getName]]
 
|Method to get the controller name.  
 
|Method to get the controller name.  
 
|-
 
|-
|[[JController::getTask/11.1|getTask]]
+
|public
 +
|[[API17:JController::getTask|getTask]]
 
|Get the last task that is being performed or was most recently performed.  
 
|Get the last task that is being performed or was most recently performed.  
 
|-
 
|-
|[[JController::getTasks/11.1|getTasks]]
+
|public
 +
|[[API17:JController::getTasks|getTasks]]
 
|Gets the available tasks in the controller.  
 
|Gets the available tasks in the controller.  
 
|-
 
|-
|[[JController::getView/11.1|getView]]
+
|public
 +
|[[API17:JController::getView|getView]]
 
|Method to get a reference to the current view and load it if necessary.  
 
|Method to get a reference to the current view and load it if necessary.  
 
|-
 
|-
|[[JController::redirect/11.1|redirect]]
+
|public
 +
|[[API17:JController::redirect|redirect]]
 
|Redirects the browser or returns false if no redirect is set.  
 
|Redirects the browser or returns false if no redirect is set.  
 
|-
 
|-
|[[JController::registerDefaultTask/11.1|registerDefaultTask]]
+
|public
 +
|[[API17:JController::registerDefaultTask|registerDefaultTask]]
 
|Register the default task to perform if a mapping is not found.  
 
|Register the default task to perform if a mapping is not found.  
 
|-
 
|-
|[[JController::registerTask/11.1|registerTask]]
+
|public
 +
|[[API17:JController::registerTask|registerTask]]
 
|Register (map) a task to a method in the class.  
 
|Register (map) a task to a method in the class.  
 
|-
 
|-
|[[JController::setAccessControl/11.1|setAccessControl]]
+
|public
 +
|[[API17:JController::setAccessControl|setAccessControl]]
 
|Sets the access control levels.  
 
|Sets the access control levels.  
 
|-
 
|-
|[[JController::setMessage/11.1|setMessage]]
+
|public
 +
|[[API17:JController::setMessage|setMessage]]
 
|Sets the internal message that is passed with a redirect.  
 
|Sets the internal message that is passed with a redirect.  
 
|-
 
|-
|[[JController::setRedirect/11.1|setRedirect]]
+
|public
 +
|[[API17:JController::setRedirect|setRedirect]]
 
|Set a URL for browser redirection.  
 
|Set a URL for browser redirection.  
 
|-
 
|-
|[[JController::addModelPath/11.1|addModelPath]]
+
|public static
 +
|[[API17:JController::addModelPath|addModelPath]]
 
|Adds to the stack of model paths in LIFO order.  
 
|Adds to the stack of model paths in LIFO order.  
 
|-
 
|-
|[[JController::getInstance/11.1|getInstance]]
+
|public static
 +
|[[API17:JController::getInstance|getInstance]]
 
|Method to get a singleton controller instance.  
 
|Method to get a singleton controller instance.  
 
|-
 
|-
|[[JController::addPath/11.1|addPath]]
+
|protected
 +
|[[API17:JController::addPath|addPath]]
 
|Adds to the search path for templates and resources.  
 
|Adds to the search path for templates and resources.  
 
|-
 
|-
|[[JController::checkEditId/11.1|checkEditId]]
+
|protected
 +
|[[API17:JController::checkEditId|checkEditId]]
 
|Method to check whether an ID is in the edit list.  
 
|Method to check whether an ID is in the edit list.  
 
|-
 
|-
|[[JController::createModel/11.1|createModel]]
+
|protected
 +
|[[API17:JController::createModel|createModel]]
 
|Method to load and return a model object.  
 
|Method to load and return a model object.  
 
|-
 
|-
|[[JController::createView/11.1|createView]]
+
|protected
 +
|[[API17:JController::createView|createView]]
 
|Method to load and return a view object.  
 
|Method to load and return a view object.  
 
|-
 
|-
|[[JController::holdEditId/11.1|holdEditId]]
+
|protected
 +
|[[API17:JController::holdEditId|holdEditId]]
 
|Method to add a record ID to the edit list.  
 
|Method to add a record ID to the edit list.  
 
|-
 
|-
|[[JController::releaseEditId/11.1|releaseEditId]]
+
|protected
 +
|[[API17:JController::releaseEditId|releaseEditId]]
 
|Method to check whether an ID is in the edit list.  
 
|Method to check whether an ID is in the edit list.  
 
|-
 
|-
|[[JController::setPath/11.1|setPath]]
+
|protected
 +
|[[API17:JController::setPath|setPath]]
 
|Sets an entire array of search paths for resources.  
 
|Sets an entire array of search paths for resources.  
 
|-
 
|-
|[[JController::createFileName/11.1|createFileName]]
+
|protected static
 +
|[[API17:JController::createFileName|createFileName]]
 
|Create the filename for a resource.  
 
|Create the filename for a resource.  
 
|-
 
|-
 
|}
 
|}
 +
* '''Defined in''' libraries/joomla/application/component/controller.php
 +
* '''Extends''' [[API17:JObject|JObject]]
 +
* '''Extended by'''
 +
** [[API17:JControllerAdmin|JControllerAdmin]]
 +
** [[API17:JControllerForm|JControllerForm]]
 
===Importing===
 
===Importing===
 
<source lang="php">jimport( 'joomla.application.component.controller' );</source>
 
<source lang="php">jimport( 'joomla.application.component.controller' );</source>
 
===See also===
 
===See also===
* JController source code in [[jplatform:application/component/controller.php|BitBucket]]
+
* {{JVer|11.1}} '''JController source code''' on [[jplatform:application/component/controller.php|BitBucket]]
* [[JController|Other versions of this class]]
+
* {{JVer|11.1}} Subpackage [[API17:Subpackage Application|Application]]
 +
* [[API17:JController|Other versions of JController]]
 
{{SeeAlso:JController}}
 
{{SeeAlso:JController}}
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JController|Edit See Also]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[SeeAlso:JController|Edit See Also]]<nowiki>]</nowiki>
 
</span>
 
</span>
===Examples===
+
===User contributed notes===
 
<CodeExamplesForm />
 
<CodeExamplesForm />
 
<dpl>
 
<dpl>
Line 119: Line 145:
 
category=ClassExample
 
category=ClassExample
 
include=*
 
include=*
 +
namespace=CodeExample
 
format= ,,,
 
format= ,,,
 
</dpl>
 
</dpl>
<noinclude>[[Category:Platform]][[Category:Platform 11.1]][[Category:JController]]</noinclude>
+
<noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude>

Revision as of 19:57, 11 May 2013

The "API17" 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.

Joomla 11.1 JController[edit]

Description[edit]

Template:Description:JController [Edit Descripton]

Methods[edit]

Visibility Method name Description
public __construct Constructor.
public addViewPath Add one or more view paths to the controller's stack, in LIFO order.
public authorise Authorisation check.
public authorize Authorisation check.
public display Typical view method for MVC based architecture.
public execute Execute a task by triggering a method in the derived class.
public getModel Method to get a model object, loading it if required.
public getName Method to get the controller name.
public getTask Get the last task that is being performed or was most recently performed.
public getTasks Gets the available tasks in the controller.
public getView Method to get a reference to the current view and load it if necessary.
public redirect Redirects the browser or returns false if no redirect is set.
public registerDefaultTask Register the default task to perform if a mapping is not found.
public registerTask Register (map) a task to a method in the class.
public setAccessControl Sets the access control levels.
public setMessage Sets the internal message that is passed with a redirect.
public setRedirect Set a URL for browser redirection.
public static addModelPath Adds to the stack of model paths in LIFO order.
public static getInstance Method to get a singleton controller instance.
protected addPath Adds to the search path for templates and resources.
protected checkEditId Method to check whether an ID is in the edit list.
protected createModel Method to load and return a model object.
protected createView Method to load and return a view object.
protected holdEditId Method to add a record ID to the edit list.
protected releaseEditId Method to check whether an ID is in the edit list.
protected setPath Sets an entire array of search paths for resources.
protected static createFileName Create the filename for a resource.

Importing[edit]

jimport( 'joomla.application.component.controller' );

See also[edit]

Template:SeeAlso:JController [Edit See Also]

User contributed notes[edit]

<CodeExamplesForm />