Initialize the form defaults of the current type

@return void
@internal
487530
protected function initializeFromFormDefaults()
    {
        $typeDefinition = $this->formFieldTypeManager->getMergedTypeDefinition($this->type);
        $this->setOptions($typeDefinition);
    }
1276117
protected function initForm()
    {
    	parent::initForm();
    	
    	$this->form->setName($this->formName);
    	
		$actions = tao_helpers_form_FormFactory::getCommonActions('top');
		$this->form->setActions($actions, 'top');
		$this->form->setActions($actions, 'bottom');
    }
562274
protected function initTypes()
    {
        $class = $this->getClassName(false);
        $types = $this->getModelTypes();
        $type = $this->_type;

        if (!$type || !is_array($type)) {
            if(!empty($types)){
                $this->_type = $types;
            }
        } elseif (!in_array($class, $type)) {
            $type[] = $class;
            $this->_type = $type;
        }

    }
212776
public function init()
    {
        if (!isset($this->options['id'])) {
            $this->options['id'] = $this->getId();
        }
        ob_start();
        ob_implicit_flush(false);

        $props = [
            'formId' => $this->id,
            'contentId' => $this->id . '-content',
            'action' => $this->action,
            'method' => $this->method,
            'layout' => $this->layout,
            'layoutCols' => $this->layoutCols,
        ];

        if (Yii::$app->has('frontendState')) {
            Yii::$app->frontendState->add('config.types.toRenderForm', [$this->id, $props]);
        } else {
            $jsArgs = [Json::encode($this->id), Json::encode($props)];
            \Yii::$app->view->registerJs('__appTypes.renderForm(' . implode(', ', $jsArgs) . ')', View::POS_END, $this->id . '-form');
        }
    }
87726
public function init()
    {
        // Check filepath
        if (empty($this->filepath)) {
            return;
        }

        // Get configurations
        $configs = include $this->filepath;

        // Check
        if (empty($configs)) {
            return;
        }

        // Iterate on configs
        foreach ($configs as $key => $props) {
            $props = !is_array($props) && !is_bool($props) ? [$props] : $props;

            if ('post_type' === $key) {
                // Add or Remove post type supports
                $this->addRemovePostTypeSupport($props);
            } else {
                // Add new theme supports
                $this->addRemoveThemeSupport($key, $props);
            }
        }
    }
590534
public function init()
	{
		parent::init();

		$classes = array('table');

		if (isset($this->type)) {
			if (is_string($this->type)) {
				$this->type = explode(' ', $this->type);
			}

			$validTypes = array(self::TYPE_STRIPED, self::TYPE_BORDERED, self::TYPE_CONDENSED);

			if (!empty($this->type)) {
				foreach ($this->type as $type) {
					if (in_array($type, $validTypes)) {
						$classes[] = 'table-' . $type;
					}
				}
			}
		}

		if (!empty($classes)) {
			$classes = implode(' ', $classes);
			if (isset($this->htmlOptions['class'])) {
				$this->htmlOptions['class'] .= ' ' . $classes;
			} else {
				$this->htmlOptions['class'] = $classes;
			}
		}
	}
345259
protected function initDefaultButtons()
    {
        $buttons = [
            'view' => [
                'title' => Yii::t('yii', 'View'),
                'aria-label' => Yii::t('yii', 'View'),
                'data-pjax' => '0',
                'icon' => 'eye-open',
            ],
            'update' => [
                'title' => Yii::t('yii', 'Update'),
                'aria-label' => Yii::t('yii', 'Update'),
                'data-pjax' => '0',
                'icon' => 'pencil'
            ],
            'delete' => [
                'title' => Yii::t('yii', 'Delete'),
                'aria-label' => Yii::t('yii', 'Delete'),
                'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'),
                'data-method' => 'post',
                'data-pjax' => '0',
                'icon' => 'trash'
            ]
        ];
        foreach ($buttons as $name => $button) {
            $this->buttons[$name] = array_merge($button, $this->buttonOptions, $this->buttons[$name]);
        }
    }
477897
protected function initDefaults()
    {
        $id = $this->getId();

        $this->hiddenInputs = ArrayHelper::merge([
            'id' => ['value' => null, 'options' => []],
            'from' => ['value' => null, 'options' => []],
            'till' => ['value' => null, 'options' => []],
        ], $this->hiddenInputs);

        $this->form = ArrayHelper::merge([
            'action' => '#',
            'method' => 'post',
            'options' => [
                'class' => ['form-inline', $this->getId()],
            ],
        ], $this->form);

        $this->pickerOptions = ArrayHelper::merge([
            'class' => DateRangePicker::class,
            'name' => '',
            'options' => [
                'tag' => false,
                'id' => "{$id}-period-btn",
            ],
            'clientEvents' => [
                'apply.daterangepicker' => new JsExpression(/** @lang JavaScript */"
                    function (event, picker) {
                        var form = $(picker.element[0]).closest('form');
                        var span = form.find('#{$id}-period-btn span');

                        span.text(picker.startDate.format('ll') + ' - ' + picker.endDate.format('ll'));

                        form.find('input[name=from]').val(picker.startDate.format());
                        form.find('input[name=till]').val(picker.endDate.format());
                        form.trigger('change.updateChart');
                    }
                "),
                'cancel.daterangepicker' => new JsExpression(/** @lang JavaScript */"
                    function (event, picker) {
                        var form = $(event.element[0]).closest('form');
                        var span = form.find('#{$id}-period-btn span');

                        span.text(span.data('prompt'));

                        form.find('input[name=from]').val('');
                        form.find('input[name=till]').val('');
                        form.trigger('change.updateChart');
                    }
                "),
            ],
            'clientOptions' => [
                'ranges' => [
                    Yii::t('hipanel', 'Current Month') => new JsExpression('[moment().startOf("month"), new Date()]'),
                    Yii::t('hipanel', 'Previous Month') => new JsExpression('[moment().subtract(1, "month").startOf("month"), moment().subtract(1, "month").endOf("month")]'),
                    Yii::t('hipanel', 'Last 3 months') => new JsExpression('[moment().subtract(3, "month").startOf("month"), new Date()]'),
                    Yii::t('hipanel', 'Last year') => new JsExpression('[moment().subtract(1, "year").startOf("year"), new Date()]'),
                ],
            ],
        ], $this->pickerOptions);
    }
428444
protected function init() {
        $reporttype = explode('\\', $this->eventname);
        $shorttype = explode('_', $reporttype[1]);
        $this->reporttype = $shorttype[1];

        $this->data['crud'] = 'r';
        $this->data['edulevel'] = self::LEVEL_TEACHING;
    }
1097314
protected function setDefaultOptions() : void
    {
        $this->setDefaultFieldOptions();
        $this->setDefaultFieldDefinitions();
        $this->setDefaultLabel();
        $this->setDefaultValue();
    }
1218556
public function initForm()
	{
		$this->form = tao_helpers_form_FormFactory::getForm('import');
	    
		$this->form->setActions(is_null($this->subForm) ? array() : $this->subForm->getActions('top'), 'top');
	    $this->form->setActions(is_null($this->subForm) ? array() : $this->subForm->getActions('bottom'), 'bottom');
				 
	}
12993
protected function initTypes()
    {
        foreach ($this->result->getFieldNames() as $index => $name) {
            $type = $this->result->getFieldType($name);

            if ($type === null) {
                $type = 'text';
            }

            $this->types[$name] = $type;
            $this->converters[$name] = $this
                ->session
                ->getClientUsingPooler('converter', $type)
            ;
        }

        return $this;
    }
87874
public function init()
    {
        parent::init();

        if (!isset($this->options['options'])) {
            $this->options['options'] = [];
        }

        $this->options['multiple'] = $this->multiple;

        $this->parseItems();
        $this->insertPlaceholder();

        $this->registerPlugin('FormSelect');
    }
1244739
public function init()
    {
        TbArray::defaultValue('layout', $this->layout, $this->activeForm);
        TbArray::defaultValue('class', '\TbActiveForm', $this->activeForm);
    }
965797
protected function setDefaults() {
        if ($this->getAccept() === null) {
            $this->setDefaultAccept();
        }

        if ($this->getContentType() === null) {
            $this->setDefaultContentType();
        }
    }
853888
protected function setDefaultDataTypes()
    {
        foreach ($this->_params as $key => $value) {
            switch (gettype($value)) {
                case "boolean":
                    $this->_types[$key] = 'boolean';
                    break;
                case "integer":
                    $this->_types[$key] = 'integer';
                    break;
                case "double":
                    $this->_types[$key] = 'float';
                    break;
                case "string":
                    $this->_types[$key] = 'string';
                    break;
                case "array":
                    $this->_types[$key] = 'array';
                    break;
                default:
                    $this->_types[$key] = null;
                    break;
            }
        }
    }
1277855
protected function InitForm()
    {
        $this->submit = $this->LoadElement();
        
        $this->AddNameField();
        $this->AddValueField();
        
        $this->AddCssIDField();
        $this->AddCssClassField();
        $this->AddTemplateField();
        $this->AddSubmit();
    }