Back to ApiController class

Method allowEdit

protected bool
allowEdit
(mixed $data = array(), mixed $key = 'id')
Method to check if you can edit an existing record.
Parameters
  • array $data An array of input data.
  • string $key The name of the key for the primary key; default is id.
Returns
  • bool
Since
  • 4.0.0
Class: ApiController
Project: Joomla

Method allowEdit - Source code

/**
 * 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
 *
 * @since   4.0.0
 */
protected function allowEdit($data = array(), $key = 'id')
{
    return $this->app->getIdentity()->authorise('core.edit', $this->option);
}