[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_categories/src/Controller/ -> CategoryController.php (summary)

(no description)

Copyright: (C) 2009 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 247 lines (8 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

CategoryController:: (9 methods):
  __construct()
  allowAdd()
  allowEdit()
  save()
  cancel()
  batch()
  getRedirectToItemAppend()
  getRedirectToListAppend()
  postSaveHook()


Class: CategoryController  - X-Ref

The Category Controller

__construct($config = array()   X-Ref
Constructor.

param: array                     $config   An optional associative array of configuration settings.
param: MVCFactoryInterface|null  $factory  The factory.
param: CMSApplication|null       $app      The Application for the dispatcher
param: Input|null                $input    Input

allowAdd($data = array()   X-Ref
Method to check if you can add a new record.

param: array  $data  An array of input data.
return: boolean

allowEdit($data = array()   X-Ref
Method to check if you can edit a record.

param: array   $data  An array of input data.
param: string  $key   The name of the key for the primary key.
return: boolean

save($key = null, $urlVar = null)   X-Ref
Override parent save method to store form data with right key as expected by edit category page

param: string  $key     The name of the primary key of the URL variable.
param: string  $urlVar  The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
return: boolean  True if successful, false otherwise.

cancel($key = null)   X-Ref
Override cancel method to clear form data for a failed edit action

param: string  $key  The name of the primary key of the URL variable.
return: boolean  True if access level checks pass, false otherwise.

batch($model = null)   X-Ref
Method to run batch operations.

param: object|null  $model  The model.
return: boolean  True if successful, false otherwise and internal error is set.

getRedirectToItemAppend($recordId = null, $urlVar = 'id')   X-Ref
Gets the URL arguments to append to an item redirect.

param: integer|null  $recordId  The primary key id for the item.
param: string        $urlVar    The name of the URL variable for the id.
return: string  The arguments to append to the redirect URL.

getRedirectToListAppend()   X-Ref
Gets the URL arguments to append to a list redirect.

return: string  The arguments to append to the redirect URL.

postSaveHook(BaseDatabaseModel $model, $validData = array()   X-Ref
Function that allows child controller access to model data after the data has been saved.

param: \Joomla\CMS\MVC\Model\BaseDatabaseModel  $model      The data model object.
param: array                                    $validData  The validated data.
return: void



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer