src/Helpers/Container.php
public function getForm($type)
    {
        $arguments = array();
        switch (strtolower($type)) {
            case 'config':
                $class = 'Config';
                $arguments[] = $this->getService();
                break;
            case 'advanced':
                $class = 'AdvancedConfig';
                $arguments[] = $this->getService();
                break;
            case 'batch':
                $class = 'Batch';
                $arguments[] = $this->getInvoiceManager();
                break;
            case 'invoice':
                $class = 'InvoiceStatusOverview';
                $arguments[] = $this->getInvoiceManager();
                $arguments[] = $this->getAcumulusEntryManager();
                $arguments[] = $this->getService();
                break;
            default;
                throw new \InvalidArgumentException("Unknown form type $type");
        }
        $arguments = array_merge($arguments, array(
            $this->getFormHelper(),
            $this->getShopCapabilities(),
            $this->getConfig(),
            $this->getTranslator(),
            $this->getLog(),
        ));
        /** @noinspection PhpIncompatibleReturnTypeInspection */
        return $this->getInstance($class . 'Form', 'Shop', $arguments);
    }
public function getForm($type)
    {
        $arguments = array();
        switch (strtolower($type)) {
            case 'config':
                $class = 'Config';
                $arguments[] = $this->getService();
                break;
            case 'advanced':
                $class = 'AdvancedConfig';
                $arguments[] = $this->getService();
                break;
            case 'batch':
                $class = 'Batch';
                $arguments[] = $this->getInvoiceManager();
                break;
            case 'invoice':
                $class = 'InvoiceStatusOverview';
                $arguments[] = $this->getInvoiceManager();
                $arguments[] = $this->getAcumulusEntryManager();
                $arguments[] = $this->getService();
                break;
            default;
                throw new \InvalidArgumentException("Unknown form type $type");
        }
        $arguments = array_merge($arguments, array(
            $this->getFormHelper(),
            $this->getShopCapabilities(),
            $this->getConfig(),
            $this->getTranslator(),
            $this->getLog(),
        ));
        /** @noinspection PhpIncompatibleReturnTypeInspection */
        return $this->getInstance($class . 'Form', 'Shop', $arguments);
    }
public function getForm ( $ type ) { $ arguments = array ( ) ; switch ( strtolower ( $ type ) ) { case 'config' : $ class = 'Config' ; $ arguments [ ] = $ this -> getService ( ) ; break ; case 'advanced' : $ class = 'AdvancedConfig' ; $ arguments [ ] = $ this -> getService ( ) ; break ; case 'batch' : $ class = 'Batch' ; $ arguments [ ] = $ this -> getInvoiceManager ( ) ; break ; case 'invoice' : $ class = 'InvoiceStatusOverview' ; $ arguments [ ] = $ this -> getInvoiceManager ( ) ; $ arguments [ ] = $ this -> getAcumulusEntryManager ( ) ; $ arguments [ ] = $ this -> getService ( ) ; break ; default ; throw new \ InvalidArgumentException ( "Unknown form type $type" ) ; } $ arguments = array_merge ( $ arguments , array ( $ this -> getFormHelper ( ) , $ this -> getShopCapabilities ( ) , $ this -> getConfig ( ) , $ this -> getTranslator ( ) , $ this -> getLog ( ) , ) ) ; /** @noinspection PhpIncompatibleReturnTypeInspection */ return $ this -> getInstance ( $ class . 'Form' , 'Shop' , $ arguments ) ; }
Returns a form instance of the given type.

@param string $type
The type of form requested.

@return \Siel\Acumulus\Helpers\Form
Returns a form instance of the given type .