<?php
namespace ModulesAbstract\Admin\Access; abstract class View_Index extends \App\Mvc\View_Popup_FormAbstract { public function getTemplatePath() { return __DIR__."/_tpl/index.tpl"; } protected function render_getForm($formValues) { if (!$this->formClassName) { throw new \Exception('You did not set the `formClassName` class attribute for the class `'.get_called_class().'`.'); } $namespace=getClassNamespace(get_called_class()); $className="\\{$namespace}\\{$this->formClassName}"; $formMngObj = new $className($this->controller); if ($formValues!==null) { $formMngObj->setValues($formValues); } $formMngObj->setCurrentAccess($this->input['currentAccess']); if ($this->input['formSubmitButtonName']) { $formMngObj->setSubmitButtonName($this->input['formSubmitButtonName']); } $form = $formMngObj->getForm(); if ($formValues && $this->input['formSubmitButtonName'] && !$formValues[$this->input['formSubmitButtonName']]) { $form->setFocus(true); } return $form; } }