public function buildPersistencePolicyObject($module, $function, array $limitations)
    {
        $limitationsToCreate = '*';
        if ($module !== '*' && $function !== '*' && !empty($limitations)) {
            $limitationsToCreate = array();
            foreach ($limitations as $limitation) {
                $limitationsToCreate[$limitation->getIdentifier()] = $limitation->limitationValues;
            }
        }

        return new SPIPolicy(
            array(
                'module' => $module,
                'function' => $function,
                'limitations' => $limitationsToCreate,
            )
        );
    }
public function buildPersistencePolicyObject($module, $function, array $limitations)
    {
        $limitationsToCreate = '*';
        if ($module !== '*' && $function !== '*' && !empty($limitations)) {
            $limitationsToCreate = array();
            foreach ($limitations as $limitation) {
                $limitationsToCreate[$limitation->getIdentifier()] = $limitation->limitationValues;
            }
        }

        return new SPIPolicy(
            array(
                'module' => $module,
                'function' => $function,
                'limitations' => $limitationsToCreate,
            )
        );
    }
public function buildPersistencePolicyObject ( $ module , $ function , array $ limitations ) { $ limitationsToCreate = '*' ; if ( $ module !== '*' && $ function !== '*' && ! empty ( $ limitations ) ) { $ limitationsToCreate = array ( ) ; foreach ( $ limitations as $ limitation ) { $ limitationsToCreate [ $ limitation -> getIdentifier ( ) ] = $ limitation -> limitationValues ; } } return new SPIPolicy ( array ( 'module' => $ module , 'function' => $ function , 'limitations' => $ limitationsToCreate , ) ) ; }
Creates SPI Policy value object from provided module, function and limitations.

@param string $module
@param string $function
@param \eZ\Publish\API\Repository\Values\User\Limitation[] $limitations

@return \eZ\Publish\SPI\Persistence\User\Policy
Creates SPI Policy value object from provided module function and limitations .