Back to AdminModel class

Method canEditState

protected bool
canEditState
(mixed $record)
Method to test whether a record can have its state changed.
Parameters
  • object $record A record object.
Returns
  • bool True if allowed to change the state of the record. Defaults to the permission for the component.
Since
  • 1.6
Class: AdminModel
Project: Joomla

Method canEditState - Source code

/**
 * Method to test whether a record can have its state changed.
 *
 * @param   object  $record  A record object.
 *
 * @return  boolean  True if allowed to change the state of the record. Defaults to the permission for the component.
 *
 * @since   1.6
 */
protected function canEditState($record)
{
    return Factory::getUser()->authorise('core.edit.state', $this->option);
}