Back to AdminModel class

Method canDelete

protected bool
canDelete
(mixed $record)
Method to test whether a record can be deleted.
Parameters
  • object $record A record object.
Returns
  • bool True if allowed to delete the record. Defaults to the permission for the component.
Since
  • 1.6
Class: AdminModel
Project: Joomla

Method canDelete - Source code

/**
 * Method to test whether a record can be deleted.
 *
 * @param   object  $record  A record object.
 *
 * @return  boolean  True if allowed to delete the record. Defaults to the permission for the component.
 *
 * @since   1.6
 */
protected function canDelete($record)
{
    return Factory::getUser()->authorise('core.delete', $this->option);
}