public function buildDomainRoleObject(SPIRole $role)
    {
        $rolePolicies = array();
        foreach ($role->policies as $spiPolicy) {
            $rolePolicies[] = $this->buildDomainPolicyObject($spiPolicy);
        }

        return new Role(
            array(
                'id' => $role->id,
                'identifier' => $role->identifier,
                'status' => $role->status,
                'policies' => $rolePolicies,
            )
        );
    }
public function buildDomainRoleObject(SPIRole $role)
    {
        $rolePolicies = array();
        foreach ($role->policies as $spiPolicy) {
            $rolePolicies[] = $this->buildDomainPolicyObject($spiPolicy);
        }

        return new Role(
            array(
                'id' => $role->id,
                'identifier' => $role->identifier,
                'status' => $role->status,
                'policies' => $rolePolicies,
            )
        );
    }
public function buildDomainRoleObject ( SPIRole $ role ) { $ rolePolicies = array ( ) ; foreach ( $ role -> policies as $ spiPolicy ) { $ rolePolicies [ ] = $ this -> buildDomainPolicyObject ( $ spiPolicy ) ; } return new Role ( array ( 'id' => $ role -> id , 'identifier' => $ role -> identifier , 'status' => $ role -> status , 'policies' => $ rolePolicies , ) ) ; }
Maps provided SPI Role value object to API Role value object.

@param \eZ\Publish\SPI\Persistence\User\Role $role

@return \eZ\Publish\API\Repository\Values\User\Role
Maps provided SPI Role value object to API Role value object .