public removeCreatorPermission ( integer $permission = null, boolean $update = true ) | ||
$permission | integer | The permission (DELETE, etc.) to remove. Defaults to all permissions. |
$update | boolean | Whether to automatically update the backend. |
public function removeCreatorPermission($permission = null, $update = true)
{
if (!isset($this->data['creator'])) {
return;
}
if ($permission && $this->get('type') == 'matrix') {
$this->data['creator'] &= ~$permission;
} else {
unset($this->data['creator']);
}
if ($update) {
$this->save();
}
}