FormController
class FormController extends BaseController
Controller tailored to suit most form-based admin operations.
Methods
Adds to the stack of model paths in LIFO order.
Method to get a singleton controller instance.
Constructor.
Add one or more view paths to the controller's stack, in LIFO order.
Typical view method for MVC based architecture
Execute a task by triggering a method in the derived class.
Method to get a model object, loading it if required.
Get the last task that is being performed or was most recently performed.
Method to get a reference to the current view and load it if necessary.
Redirects the browser or returns false if no redirect is set.
Register the default task to perform if a mapping is not found.
Register (map) a task to a method in the class.
Unregister (unmap) a task in the class.
Sets the internal message that is passed with a redirect
Checks for a form token in the request.
Set a URL for browser redirection.
Method to add a new record.
Method to run batch operations.
Method to cancel an edit.
Method to edit an existing record.
Method to load a row from version history
Method to save a record.
Method to reload a record.
Load item to edit associations in com_associations
Details
static
void
addModelPath(
mixed $path,
string $prefix = '')
Adds to the stack of model paths in LIFO order.
static
JControllerLegacy
getInstance(
string $prefix,
array $config = array())
Method to get a singleton controller instance.
JControllerLegacy
addViewPath(
mixed $path)
Add one or more view paths to the controller's stack, in LIFO order.
JControllerLegacy
display(
boolean $cachable = false,
array $urlparams = array())
Typical view method for MVC based architecture
This function is provide as a default implementation, in most cases you will need to override it in your own controllers.
JModelLegacy|boolean
getModel(
string $name = '',
string $prefix = '',
array $config = array('ignore_request' => true))
Method to get a model object, loading it if required.
string
getName()
Method to get the controller name
The dispatcher name is set by default parsed using the classname, or it can be set by passing a $config['name'] in the class constructor
JViewLegacy
getView(
string $name = '',
string $type = '',
string $prefix = '',
array $config = array())
Method to get a reference to the current view and load it if necessary.
JControllerLegacy
registerDefaultTask(
string $method)
Register the default task to perform if a mapping is not found.
JControllerLegacy
registerTask(
string $task,
string $method)
Register (map) a task to a method in the class.
string
setMessage(
string $text,
string $type = 'message')
Sets the internal message that is passed with a redirect
boolean
checkToken(
string $method = 'post',
boolean $redirect = true)
Checks for a form token in the request.
Use in conjunction with \JHtml::_('form.token') or \JSession::getFormToken.