Get Form object by name

@param string $type Form name

@return Form
552580
public function getForm($type = null)
    {
        if (!isset($this->forms[$type])) {
            $form = $this->getManager()->newForm($type);

            $this->forms[$type] = $this->initForm($form);
        }

        return $this->forms[$type];
    }
2869
public static function get($type, $name)
    {

        return ModuleCompiler::get($type, $name) ?: static::where('type', $type)->where('name', $name)->first();
    }
755599
public function getFormUrl($type = null)
    {
        $type = strtoupper($type);
        return $this->client->getFormBaseUrl() . $type . '.js?' . $this->getPaymentUrlQueryString(
            self::FORM_TYPE_FL === $type || self::FORM_TYPE_FLS === $type
        );
    }
1113775
public static function getInstance($type)
    {
        $classname = self::getClassname($type);

        if (!isset(self::$__instances[$classname])) {
            $instance = new $classname();
            self::$__instances[$classname] = $instance;
        }

        $instance = clone self::$__instances[$classname];

        return $instance;
    }
1198930
public function getPost(string $name, string $type = null, $default = null)
    {
        $value = $this->getUserData($this->post, $name);

        if ($type) {
            $value = $this->validateType($value, $type, $default);
        }

        return $value;
    }
1055617
public function getExampleByType($type)
    {
        return isset($this->bodyList[$type]['example']) ? $this->bodyList[$type]['example'] : null;
    }
242312
public static function getType($type)
    {
        $type = strtolower($type);

        if (!isset(static::$typeMapping[$type])) {
            return $type;
        }

        return static::$typeMapping[$type];
    }
323149
public function getForm(string $name = null, array $options = []): Form
    {
        $name               = $name ?? $this->form ?? $this->serviceAlias;
        $sl                 = $this->getServiceLocator();
        $formElementManager = $sl->get('FormElementManager');
        $argv               = compact('options');
        $argv               = $this->prepareEventArguments($argv);

        $this->getEventManager()->trigger(self::EVENT_PRE_FORM_INIT, $this, $argv);

        /* @var $form Form */
        $form = $formElementManager->get($name, $options);
        $argv = compact('form', 'options');
        $argv = $this->prepareEventArguments($argv);

        $this->getEventManager()->trigger(self::EVENT_POST_FORM_INIT, $this, $argv);

        return $form;
    }
498003
public function getValue(string $name)
    {
        // Attempt to get value from the form data.
        $value = $this->data ? $this->data[$name] : null;

        // Return the form data or fall back to the object property.
        return $value ?? $this->getObject()->value($name);
    }
241038
public function &get($type) {
        $list = array();

        foreach ($this->args as &$d) {
            if ($this->_isType($d, $type)) {
                $list[] = $d;
            }
        }

        return $list;
    }
1148264
public static function getCodeByType($type)
    {
        if (isset(self::$typeList[$type])) {
            return self::$typeList[$type];
        } else {
            return false;
        }
    }
726582
public function getAttribute($type)
    {
        $value = null;

        if (is_array($this->attributesReceived)) {
            foreach($this->attributesReceived as $attr) {
                if (intval($type) == $attr[0]) {
                    $value = $attr[1];
                    break;
                }
            }
        }

        return $value;
    }
191657
public function createForm($name, $type = "form", array $data = array(), array $options = array())
    {
        if (empty($name)) {
            $name = static::EMPTY_FORM_NAME;
        }

        return $this->getTheliaFormFactory()->createForm($name, $type, $data, $options);
    }
237582
public static function get($type)
    {
        if (\is_string($type))
        {
            if (\defined(static::class . '::' . $type))
            {
                return \constant(static::class . '::' . $type);
            }

            if (\defined($type))
            {
                return \constant($type);
            }

            return \T_STRING;
        }

        foreach (static::constants() as $name => $value)
        {
            if ($value === $type)
            {
                return $name;
            }
        }

        $token = \token_name($type);

        if ($token === 'UNKNOWN')
        {
            return 'T_STRING';
        }

        return $token;
    }
1332558
function typeToForm($name, $type)
    {
        // get typedef
        if ($typeDef = $this->getTypeDef($type)) {
            // if struct
            if ($typeDef['phpType'] == 'struct') {
                $buffer .= '<table>';
                foreach ($typeDef['elements'] as $child => $childDef) {
                    $buffer .= "
					<tr><td align='right'>$childDef[name] (type: " . $this->getLocalPart($childDef['type']) . "):</td>
					<td><input type='text' name='parameters[" . $name . "][$childDef[name]]'></td></tr>";
                }
                $buffer .= '</table>';
                // if array
            } elseif ($typeDef['phpType'] == 'array') {
                $buffer .= '<table>';
                for ($i = 0; $i < 3; $i++) {
                    $buffer .= "
					<tr><td align='right'>array item (type: $typeDef[arrayType]):</td>
					<td><input type='text' name='parameters[" . $name . "][]'></td></tr>";
                }
                $buffer .= '</table>';
                // if scalar
            } else {
                $buffer .= "<input type='text' name='parameters[$name]'>";
            }
        } else {
            $buffer .= "<input type='text' name='parameters[$name]'>";
        }

        return $buffer;
    }
459528
protected function form($type, $name = null, $value = null) {
		
		$form = new Form();
		return $form -> {$type}($name, $value);
	}
507751
public function getFormClassName($type = null)
    {
        if (!$type) {
            $type = $this->getFormTypeDefault();
        }

        $module = $this->getRequest()->getModuleName();
        if (strpos($type, 'admin-') !== false) {
            $module = 'admin';
            $type = str_replace('admin-', '', $type);
        } elseif (strpos($type, 'default-') !== false) {
            $type = str_replace('default-', '', $type);
        }

        $name = ucfirst($module) . '_Forms_';
        $name .= $this->getFormClassNameSlug() . '_';
        $name .= inflector()->classify($type);

        return $name;
    }