<?php

namespace ModulesAbstract\FileExplorer;

abstract class View_Utils_FormDirectory extends \App\Mvc\View_Utils_FormAbstract
{

	/**
	 * The sbstract lang array.
	 * @var array
	 */
	protected $absLang;

	/**
	 * (non-PHPdoc)
	 * @see \App\Mvc\View_Utils_FormAbstract::loadModuleConfigs()
	 */
	protected function loadModuleConfigs()
	{
		parent::loadModuleConfigs();
		$this->absLang =  \App\Loader_Lang::getInstance()->loadAppFolder('_customLoad/modulesAbstract/fileExplorer')->getSection('ModulesAbstract/FileExplorer');
	}


	/**
	 * Creates the form for directory insert/rename.
	 * @see \App\Mvc\View_Utils_FormAbstract::getForm()
	 */
	public function getForm()
	{
		$form=\Engine\Form\General::create();
		$form->setStyle('width', '200');
		$form->addContainer(\Engine\Form\Container\Fieldset::create());

		// folder name
		$fld_name = new \Engine\Form\Input\Text($this->absLang['formRow']['name'], 'name', $this->values['name']);
		$fld_name->setMandatory(true);
		$form->addElement($fld_name);

		// submit button
		$form->addElement(new \Engine\Form\Input\Hidden('', $this->submitButtonName, 1));

		return $form;

	}

}