Sensio\Bundle\GeneratorBundle\Command\GenerateDoctrineCrudCommand::getRoutePrefix PHP Method

getRoutePrefix() protected method

protected getRoutePrefix ( Symfony\Component\Console\Input\InputInterface $input, $entity )
$input Symfony\Component\Console\Input\InputInterface
    protected function getRoutePrefix(InputInterface $input, $entity)
    {
        $prefix = $input->getOption('route-prefix') ?: strtolower(str_replace(array('\\', '/'), '_', $entity));

        if ($prefix && '/' === $prefix[0]) {
            $prefix = substr($prefix, 1);
        }

        return $prefix;
    }