/** * * * @param type $values * @param type $view * @param type $code * @return type */ public function htmlView($values = null, $view = null, $code = null) { // pass $data values to $this ($app) if (is_array($values)) { foreach ($values as $field => $value) { $this->{$field} = $value; } } // get code for related view $currentCode = $code ? $code : $this->request->code; // get $currentView = $view ? $view : $this->request->view; // if ($this->_module) { $viewFile = $this->_module->path . "/view/{$currentCode}/{$currentView}.phtml"; } else { if ($this->_modules['common']) { $viewFile = $this->_modules['common']->path . "/view/{$currentCode}/{$currentView}.phtml"; } else { Runtime::error('required common module', 99303); } } // if (!file_exists($viewFile)) { Runtime::error("file not found: {$viewFile}", 99102); } // return $this->outputBufferInclude($viewFile); }
/** * * */ public function requireOnceModuleFile($moduleName, $moduleVersion) { // $moduleCode = ucfirst($moduleName); // $modulePath = __BASE__ . '/module/' . $moduleName . '/' . intval($moduleVersion); // $moduleClass = '\\Module\\' . $moduleCode . '\\' . $moduleCode . 'Module'; // if (!class_exists($moduleClass)) { Runtime::error("class not found (for module): {$moduleClass}", 99204); } // $moduleObject = new $moduleClass(); // $this->_modules[$moduleName] = (object) array('name' => $moduleName, 'path' => $modulePath, 'class' => $moduleClass, 'object' => $moduleObject, 'version' => $moduleVersion, 'namespace' => 'Module\\' . $moduleCode); // $this->loadModuleTextFile($moduleName, $modulePath); }
/** * Handle errors * * @param type $message * @param type $code */ public function error($message, $code = 0) { // Runtime::error($message, $code); // exit; }
/** * * @param type $label */ public function drawFormCell($label, $size = 12) { // if (!$this->_formCurrentPanel) { Runtime::error('Call drawFromField() outside of drawFormPanels methods', 99101); } // $this->_formCellCounting += $size; // echo $this->_formOutputBuffer; // if ($this->_formCellCounting > 12) { // echo '</div><div class="row">'; // $this->_formCellCounting = $size; } // echo '<div class="col-xs-' . $size . '">'; // if ($label) { echo '<label>' . $label . '</label>'; } // $this->_formOutputBuffer = '</div>'; }