PHP Class Stevemo\Cpanel\Permission\Form\PermissionForm

Inheritance: implements Stevemo\Cpanel\Permission\Form\PermissionFormInterface
Exibir arquivo Open project: stevemo/cpanel

Protected Properties

Property Type Description
$permission Stevemo\Cpanel\Permission\Repo\PermissionInterface
$validator Stevemo\Cpanel\Services\Validation\ValidableInterface

Public Methods

Method Description
__construct ( Stevemo\Cpanel\Services\Validation\ValidableInterface $validator, Stevemo\Cpanel\Permission\Repo\PermissionInterface $permission )
create ( array $data ) : StdClass Create a new set of permissions
getErrors ( ) : array | Illuminate\Support\MessageBag Get the validation errors
update ( array $data ) : StdClass Update a current set of permissions

Method Details

__construct() public method

public __construct ( Stevemo\Cpanel\Services\Validation\ValidableInterface $validator, Stevemo\Cpanel\Permission\Repo\PermissionInterface $permission )
$validator Stevemo\Cpanel\Services\Validation\ValidableInterface
$permission Stevemo\Cpanel\Permission\Repo\PermissionInterface

create() public method

Create a new set of permissions
Author: Steve Montambeault
public create ( array $data ) : StdClass
$data array
return StdClass

getErrors() public method

Get the validation errors
Author: Steve Montambeault
public getErrors ( ) : array | Illuminate\Support\MessageBag
return array | Illuminate\Support\MessageBag

update() public method

Update a current set of permissions
Author: Steve Montambeault
public update ( array $data ) : StdClass
$data array
return StdClass

Property Details

$permission protected_oe property

protected PermissionInterface,Stevemo\Cpanel\Permission\Repo $permission
return Stevemo\Cpanel\Permission\Repo\PermissionInterface

$validator protected_oe property

protected ValidableInterface,Stevemo\Cpanel\Services\Validation $validator
return Stevemo\Cpanel\Services\Validation\ValidableInterface