public function buildPersistenceRoleCreateStruct(APIRoleCreateStruct $roleCreateStruct)
    {
        $policiesToCreate = array();
        foreach ($roleCreateStruct->getPolicies() as $policyCreateStruct) {
            $policiesToCreate[] = $this->buildPersistencePolicyObject(
                $policyCreateStruct->module,
                $policyCreateStruct->function,
                $policyCreateStruct->getLimitations()
            );
        }

        return new SPIRoleCreateStruct(
            array(
                'identifier' => $roleCreateStruct->identifier,
                'policies' => $policiesToCreate,
            )
        );
    }
public function buildPersistenceRoleCreateStruct(APIRoleCreateStruct $roleCreateStruct)
    {
        $policiesToCreate = array();
        foreach ($roleCreateStruct->getPolicies() as $policyCreateStruct) {
            $policiesToCreate[] = $this->buildPersistencePolicyObject(
                $policyCreateStruct->module,
                $policyCreateStruct->function,
                $policyCreateStruct->getLimitations()
            );
        }

        return new SPIRoleCreateStruct(
            array(
                'identifier' => $roleCreateStruct->identifier,
                'policies' => $policiesToCreate,
            )
        );
    }
public function buildPersistenceRoleCreateStruct ( APIRoleCreateStruct $ roleCreateStruct ) { $ policiesToCreate = array ( ) ; foreach ( $ roleCreateStruct -> getPolicies ( ) as $ policyCreateStruct ) { $ policiesToCreate [ ] = $ this -> buildPersistencePolicyObject ( $ policyCreateStruct -> module , $ policyCreateStruct -> function , $ policyCreateStruct -> getLimitations ( ) ) ; } return new SPIRoleCreateStruct ( array ( 'identifier' => $ roleCreateStruct -> identifier , 'policies' => $ policiesToCreate , ) ) ; }
Creates SPI Role create struct from provided API role create struct.

@param \eZ\Publish\API\Repository\Values\User\RoleCreateStruct $roleCreateStruct

@return \eZ\Publish\SPI\Persistence\User\RoleCreateStruct
Creates SPI Role create struct from provided API role create struct .