protected function generateEntityAdminType(
        $bundle,
        $entityName,
        $entityPrefix,
        array $fields,
        $extendClass = '\Symfony\Component\Form\AbstractType'
    ) {
        $className = $entityName . 'AdminType';
        $savePath = $bundle->getPath() . '/Form/' . $entityPrefix . '/' . $className . '.php';
        $name = str_replace(
                '\\',
                '_',
                strtolower($bundle->getNamespace())
            ) . '_' . strtolower($entityName) . 'type';

        $params = array(
            'className' => $className,
            'name' => $name,
            'namespace' => $bundle->getNamespace(),
            'entity' => '\\' . $bundle->getNamespace() . '\Entity\\' . $entityPrefix . '\\' . $entityName,
            'fields' => $fields,
            'entity_prefix' => $entityPrefix,
            'extend_class' => $extendClass,
        );
        $this->renderFile('/Form/EntityAdminType.php', $savePath, $params);
    }