public function buildDomainUserGroupRoleAssignmentObject(SPIRoleAssignment $spiRoleAssignment, UserGroup $userGroup, APIRole $role)
    {
        $limitation = null;
        if (!empty($spiRoleAssignment->limitationIdentifier)) {
            $limitation = $this
                ->limitationService
                ->getLimitationType($spiRoleAssignment->limitationIdentifier)
                ->buildValue($spiRoleAssignment->values);
        }

        return new UserGroupRoleAssignment(
            array(
                'id' => $spiRoleAssignment->id,
                'limitation' => $limitation,
                'role' => $role,
                'userGroup' => $userGroup,
            )
        );
    }
public function buildDomainUserGroupRoleAssignmentObject(SPIRoleAssignment $spiRoleAssignment, UserGroup $userGroup, APIRole $role)
    {
        $limitation = null;
        if (!empty($spiRoleAssignment->limitationIdentifier)) {
            $limitation = $this
                ->limitationService
                ->getLimitationType($spiRoleAssignment->limitationIdentifier)
                ->buildValue($spiRoleAssignment->values);
        }

        return new UserGroupRoleAssignment(
            array(
                'id' => $spiRoleAssignment->id,
                'limitation' => $limitation,
                'role' => $role,
                'userGroup' => $userGroup,
            )
        );
    }
public function buildDomainUserGroupRoleAssignmentObject ( SPIRoleAssignment $ spiRoleAssignment , UserGroup $ userGroup , APIRole $ role ) { $ limitation = null ; if ( ! empty ( $ spiRoleAssignment -> limitationIdentifier ) ) { $ limitation = $ this -> limitationService -> getLimitationType ( $ spiRoleAssignment -> limitationIdentifier ) -> buildValue ( $ spiRoleAssignment -> values ) ; } return new UserGroupRoleAssignment ( array ( 'id' => $ spiRoleAssignment -> id , 'limitation' => $ limitation , 'role' => $ role , 'userGroup' => $ userGroup , ) ) ; }
Builds the API UserGroupRoleAssignment object from provided SPI RoleAssignment object.

@param \eZ\Publish\SPI\Persistence\User\RoleAssignment $spiRoleAssignment
@param \eZ\Publish\API\Repository\Values\User\UserGroup $userGroup
@param \eZ\Publish\API\Repository\Values\User\Role $role

@return \eZ\Publish\API\Repository\Values\User\UserGroupRoleAssignment
Builds the API UserGroupRoleAssignment object from provided SPI RoleAssignment object .