Ejemplo n.º 1
0
 /**
  * @param UniqueIdentifierInterface $id
  *
  * @return Role|null
  */
 public function findById(UniqueIdentifierInterface $id)
 {
     /** @var RoleId $roleId */
     $collection = isset($this->roles[$id->toInteger()]) ? $this->roles[$id->toInteger()] : false;
     if (false !== $collection) {
         return $this->roleFactory->createRole($id->toInteger(), $collection['label'], $collection['permission']);
     }
     return null;
 }