Ojs\AdminBundle\Controller\AdminJournalApplicationFileController::createCreateForm PHP Method

createCreateForm() private method

Creates a form to create a Index entity.
private createCreateForm ( JournalApplicationFile $entity ) : Form
$entity Ojs\JournalBundle\Entity\JournalApplicationFile The entity
return Symfony\Component\Form\Form The form
    private function createCreateForm(JournalApplicationFile $entity)
    {
        $languages = [];
        if (is_array($this->container->getParameter('languages'))) {
            foreach ($this->container->getParameter('languages') as $key => $language) {
                if (array_key_exists('code', $language)) {
                    $languages[$language['code']] = $language['name'];
                }
            }
        }
        $form = $this->createForm(new JournalApplicationFileType(), $entity, array('action' => $this->generateUrl('ojs_admin_application_file_create'), 'method' => 'POST', 'languages' => $languages));
        return $form;
    }