public static function create($name, $description = "", $permissions = [])
    {
        $role = new self();
        $role->name = $name;
        $role->description = $description;
        foreach ($permissions as $permission) {
            $role->addPermission($permission);
        }
        return $role;
    }
public static function create($name, $description = "", $permissions = [])
    {
        $role = new self();
        $role->name = $name;
        $role->description = $description;
        foreach ($permissions as $permission) {
            $role->addPermission($permission);
        }
        return $role;
    }
public static function create ( $ name , $ description = "" , $ permissions = [ ] ) { $ role = new self ( ) ; $ role -> name = $ name ; $ role -> description = $ description ; foreach ( $ permissions as $ permission ) { $ role -> addPermission ( $ permission ) ; } return $ role ; }
Generate a new Permission instance to be saved to the data store.

@param string $name Unique name of the role
@param string $description Optional description of this role
@param Permission[] $permissions Array of initial permissions to add to the role
@return Role
Generate a new Permission instance to be saved to the data store .