Since: 5.4.0 (04.03.2015)
Author: Vitaliy Demidov (vitaliy@scalr.com)
Inheritance: extends Scalr\Api\Rest\Controller\ApiController, use trait GlobalVariableTrait
Example #1
0
 /**
  * Gets role from database using User's Environment
  *
  * @param   int     $roleId          The identifier of the Role
  * @param   bool    $modify optional Flag checking write permissions
  *
  * @return  Role|null
  *
  * @throws  ApiErrorException
  */
 public function getRole($roleId, $modify = false)
 {
     if (empty($this->roleController)) {
         $this->roleController = $this->getContainer()->api->controller(static::$roleControllerClass);
     }
     return $this->roleController->getRole($roleId, $modify);
 }