[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/MVC/Controller/ -> ApiController.php (summary)

Joomla! Content Management System

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

Defines 1 class

ApiController:: (10 methods):
  __construct()
  displayItem()
  displayList()
  delete()
  add()
  edit()
  save()
  allowEdit()
  allowAdd()
  preprocessSaveData()


Class: ApiController  - X-Ref

Base class for a Joomla API Controller

Controller (controllers are where you put all the actual code) Provides basic
functionality, such as rendering views (aka displaying templates).

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

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

displayItem($id = null)   X-Ref
Basic display of an item view

param: integer  $id  The primary key to display. Leave empty if you want to retrieve data from the request
return: static  A \JControllerLegacy object to support chaining.

displayList()   X-Ref
Basic display of a list view

return: static  A \JControllerLegacy object to support chaining.

delete($id = null)   X-Ref
Removes an item.

param: integer  $id  The primary key to delete item.
return: void

add()   X-Ref
Method to add a new record.

return: void

edit()   X-Ref
Method to edit an existing record.

return: static  A \JControllerLegacy object to support chaining.

save($recordKey = null)   X-Ref
Method to save a record.

param: integer  $recordKey  The primary key of the item (if exists)
return: integer  The record ID on success, false on failure

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

Extended classes can override this if necessary.

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

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

Extended classes can override this if necessary.

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

preprocessSaveData(array $data)   X-Ref
Method to allow extended classes to manipulate the data to be saved for an extension.

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



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