protected function extractIdFrom(EnvironmentInterface $environment, $parameterName = 'pid')
    {
        $parameter = $environment->getInputProvider()->getParameter($parameterName);

        return ModelId::fromSerialized($parameter)->getId();
    }
protected function extractIdFrom(EnvironmentInterface $environment, $parameterName = 'pid')
    {
        $parameter = $environment->getInputProvider()->getParameter($parameterName);

        return ModelId::fromSerialized($parameter)->getId();
    }
Extract the id value from the serialized parameter with the given name.

@param EnvironmentInterface $environment   The environment.

@param string               $parameterName The parameter name containing the id.

@return int