public function create($className, $username)
    {
        $reflectionClass = new \ReflectionClass($className);

        $permalinks = $this->pagesParser
            ->contributor($username)
            ->parse()
            ->permalinksByLanguage(
                $this->configurationHandler->language() . '_' . $this->configurationHandler->country()
            );
        $permalinksForSelect = (!empty($permalinks)) ? array_combine($permalinks, $permalinks) : array();
        $params = array($permalinksForSelect);

        $form = $this->formFactory->create($reflectionClass->newInstanceArgs($params));

        return $form->createView();
    }
public function create($className, $username)
    {
        $reflectionClass = new \ReflectionClass($className);

        $permalinks = $this->pagesParser
            ->contributor($username)
            ->parse()
            ->permalinksByLanguage(
                $this->configurationHandler->language() . '_' . $this->configurationHandler->country()
            );
        $permalinksForSelect = (!empty($permalinks)) ? array_combine($permalinks, $permalinks) : array();
        $params = array($permalinksForSelect);

        $form = $this->formFactory->create($reflectionClass->newInstanceArgs($params));

        return $form->createView();
    }
public function create ( $ className , $ username ) { $ reflectionClass = new \ ReflectionClass ( $ className ) ; $ permalinks = $ this -> pagesParser -> contributor ( $ username ) -> parse ( ) -> permalinksByLanguage ( $ this -> configurationHandler -> language ( ) . '_' . $ this -> configurationHandler -> country ( ) ) ; $ permalinksForSelect = ( ! empty ( $ permalinks ) ) ? array_combine ( $ permalinks , $ permalinks ) : array ( ) ; $ params = array ( $ permalinksForSelect ) ; $ form = $ this -> formFactory -> create ( $ reflectionClass -> newInstanceArgs ( $ params ) ) ; return $ form -> createView ( ) ; }
Creates the form

@param string $className
@param string $username
@return \Symfony\Component\Form\FormView
Creates the form