Ejemplo n.º 1
0
 /**
  * @param int $idGroup
  *
  * @return \Generated\Shared\Transfer\RoleTransfer
  */
 public function getRoles($idGroup)
 {
     $roleCollection = $this->queryContainer->queryGroupRoles($idGroup)->find();
     $roleTransferCollection = new RolesTransfer();
     foreach ($roleCollection as $roleEntity) {
         $roleTransfer = new RoleTransfer();
         $roleTransfer->fromArray($roleEntity->toArray(), true);
         $roleTransferCollection->addRole($roleTransfer);
     }
     return $roleTransferCollection;
 }
Ejemplo n.º 2
0
Archivo: Role.php Proyecto: spryker/Acl
 /**
  * @param int $idGroup
  *
  * @return \Generated\Shared\Transfer\RolesTransfer
  */
 public function getGroupRoles($idGroup)
 {
     $aclRoleEntities = $this->queryContainer->queryGroupRoles($idGroup)->find();
     $rolesTransfer = new RolesTransfer();
     foreach ($aclRoleEntities as $aclRoleEntity) {
         $roleTransfer = new RoleTransfer();
         $roleTransfer->fromArray($aclRoleEntity->toArray(), true);
         $rolesTransfer->addRole($roleTransfer);
     }
     return $rolesTransfer;
 }