src/Searsaw/Drawbridge/models/BridgeRole.php
public function addPermissionByObject(BridgePermission $permission_obj)
    {
        if (! $permission_obj->exists)
            $permission_obj->save();

        $permission_id = $permission_obj->getKey();

        return $this->addPermissionById($permission_id);
    }
public function addPermissionByObject(BridgePermission $permission_obj)
    {
        if (! $permission_obj->exists)
            $permission_obj->save();

        $permission_id = $permission_obj->getKey();

        return $this->addPermissionById($permission_id);
    }
public function addPermissionByObject ( BridgePermission $ permission_obj ) { if ( ! $ permission_obj -> exists ) $ permission_obj -> save ( ) ; $ permission_id = $ permission_obj -> getKey ( ) ; return $ this -> addPermissionById ( $ permission_id ) ; }
Add a single permission to the role by using the Permission object

@param $permission_obj \Searsaw\Drawbridge\Models\BridgePermission The Permission object to add

@return \Searsaw\Drawbridge\Models\BridgePermission
Add a single permission to the role by using the Permission object