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

        return ModelId::fromSerialized($parameter)->getId();
    }