API17

Difference between revisions of "JControllerForm"

From Joomla! Documentation

(Layout updates)
(Updated to r1448:247ba8d88526)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 +
=={{JVer|11.1}} JControllerForm==
 +
===Description===
 +
{{Description:JControllerForm}}
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[Description:JControllerForm|Edit Descripton]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[Description:JControllerForm|Edit Descripton]]<nowiki>]</nowiki>
 
</span>
 
</span>
{{Description:JControllerForm}}
 
===Defined in===
 
libraries/joomla/application/component/controllerform.php
 
* see source code in [[jplatform:application/component/controllerform.php|BitBucket]]
 
===Subpackage===
 
[[Subpackage Application/11.1|Application]]
 
===Extends===
 
[[JController/11.1|JController]]
 
===Extended by===
 
 
===Methods===
 
===Methods===
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
 
|-
 
|-
 +
!Visibility
 
!Method name
 
!Method name
 
!Description
 
!Description
 
|-
 
|-
 +
|public
 
|[[JControllerForm::__construct/11.1|__construct]]
 
|[[JControllerForm::__construct/11.1|__construct]]
 
|Constructor.  
 
|Constructor.  
 
|-
 
|-
 +
|public
 
|[[JControllerForm::add/11.1|add]]
 
|[[JControllerForm::add/11.1|add]]
 
|Method to add a new record.  
 
|Method to add a new record.  
 
|-
 
|-
 +
|public
 
|[[JControllerForm::cancel/11.1|cancel]]
 
|[[JControllerForm::cancel/11.1|cancel]]
 
|Method to cancel an edit.  
 
|Method to cancel an edit.  
 
|-
 
|-
 +
|public
 
|[[JControllerForm::edit/11.1|edit]]
 
|[[JControllerForm::edit/11.1|edit]]
 
|Method to edit an existing record.  
 
|Method to edit an existing record.  
 
|-
 
|-
 +
|public
 
|[[JControllerForm::getModel/11.1|getModel]]
 
|[[JControllerForm::getModel/11.1|getModel]]
 
|Method to get a model object, loading it if required.  
 
|Method to get a model object, loading it if required.  
 
|-
 
|-
 +
|public
 
|[[JControllerForm::save/11.1|save]]
 
|[[JControllerForm::save/11.1|save]]
 
|Method to save a record.  
 
|Method to save a record.  
 
|-
 
|-
 +
|protected
 
|[[JControllerForm::allowAdd/11.1|allowAdd]]
 
|[[JControllerForm::allowAdd/11.1|allowAdd]]
 
|Method to check if you can add a new record.  
 
|Method to check if you can add a new record.  
 
|-
 
|-
 +
|protected
 
|[[JControllerForm::allowEdit/11.1|allowEdit]]
 
|[[JControllerForm::allowEdit/11.1|allowEdit]]
 
|Method to check if you can add a new record.  
 
|Method to check if you can add a new record.  
 
|-
 
|-
 +
|protected
 
|[[JControllerForm::allowSave/11.1|allowSave]]
 
|[[JControllerForm::allowSave/11.1|allowSave]]
 
|Method to check if you can save a new or existing record.  
 
|Method to check if you can save a new or existing record.  
 
|-
 
|-
 +
|protected
 
|[[JControllerForm::getRedirectToItemAppend/11.1|getRedirectToItemAppend]]
 
|[[JControllerForm::getRedirectToItemAppend/11.1|getRedirectToItemAppend]]
 
|Gets the URL arguments to append to an item redirect.  
 
|Gets the URL arguments to append to an item redirect.  
 
|-
 
|-
 +
|protected
 
|[[JControllerForm::getRedirectToListAppend/11.1|getRedirectToListAppend]]
 
|[[JControllerForm::getRedirectToListAppend/11.1|getRedirectToListAppend]]
 
|Gets the URL arguments to append to a list redirect.  
 
|Gets the URL arguments to append to a list redirect.  
 
|-
 
|-
 +
|protected
 
|[[JControllerForm::postSaveHook/11.1|postSaveHook]]
 
|[[JControllerForm::postSaveHook/11.1|postSaveHook]]
 
|Function that allows child controller access to model data after the data has been saved.  
 
|Function that allows child controller access to model data after the data has been saved.  
 
|-
 
|-
 
|}
 
|}
 +
* '''Defined in''' libraries/joomla/application/component/controllerform.php
 +
* '''Extends''' [[JController/11.1|JController]]
 
===Importing===
 
===Importing===
 
<source lang="php">jimport( 'joomla.application.component.controllerform' );</source>
 
<source lang="php">jimport( 'joomla.application.component.controllerform' );</source>
 
===See also===
 
===See also===
* JControllerForm source code in [[jplatform:application/component/controllerform.php|BitBucket]]
+
* {{JVer|11.1}} '''JControllerForm source code''' on [[jplatform:application/component/controllerform.php|BitBucket]]
* [[JControllerForm|Other versions of this class]]
+
* {{JVer|11.1}} Subpackage [[Subpackage Application/11.1|Application]]
 +
* [[JControllerForm|Other versions of JControllerForm]]
 
{{SeeAlso:JControllerForm}}
 
{{SeeAlso:JControllerForm}}
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JControllerForm|Edit See Also]]<nowiki>]</nowiki>
 
<nowiki>[</nowiki>[[SeeAlso:JControllerForm|Edit See Also]]<nowiki>]</nowiki>
 
</span>
 
</span>
===Examples===
+
===User contributed notes===
 
<CodeExamplesForm />
 
<CodeExamplesForm />
 
<dpl>
 
<dpl>
Line 72: Line 82:
 
category=ClassExample
 
category=ClassExample
 
include=*
 
include=*
 +
namespace=CodeExample
 
format= ,,,
 
format= ,,,
 
</dpl>
 
</dpl>
 
<noinclude>[[Category:Platform]][[Category:Platform 11.1]][[Category:JControllerForm]]</noinclude>
 
<noinclude>[[Category:Platform]][[Category:Platform 11.1]][[Category:JControllerForm]]</noinclude>

Revision as of 17:57, 27 April 2011

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 JControllerForm[edit]

Description[edit]

Template:Description:JControllerForm [Edit Descripton]

Methods[edit]

Visibility Method name Description
public __construct Constructor.
public add Method to add a new record.
public cancel Method to cancel an edit.
public edit Method to edit an existing record.
public getModel Method to get a model object, loading it if required.
public save Method to save a record.
protected allowAdd Method to check if you can add a new record.
protected allowEdit Method to check if you can add a new record.
protected allowSave Method to check if you can save a new or existing record.
protected getRedirectToItemAppend Gets the URL arguments to append to an item redirect.
protected getRedirectToListAppend Gets the URL arguments to append to a list redirect.
protected postSaveHook Function that allows child controller access to model data after the data has been saved.
  • Defined in libraries/joomla/application/component/controllerform.php
  • Extends JController

Importing[edit]

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

See also[edit]

Template:SeeAlso:JControllerForm [Edit See Also]

User contributed notes[edit]

<CodeExamplesForm />