CMS  Version 3.9
CodeModuleView Class Reference
+ Inheritance diagram for CodeModuleView:
+ Collaboration diagram for CodeModuleView:

Public Member Functions

 CodeModuleView ($module)
 
 drawView ($cssClass="")
 
- Public Member Functions inherited from ModuleView
 ModuleView ($module)
 
 drawView ()
 
 wrap ($output)
 

Additional Inherited Members

- Static Public Member Functions inherited from ModuleView
static create ($module)
 
- Public Attributes inherited from ModuleView
 $module
 

Detailed Description

Definition at line 131 of file module_view.inc.

Member Function Documentation

◆ CodeModuleView()

CodeModuleView::CodeModuleView (   $module)

Definition at line 133 of file module_view.inc.

134  {
135  $this->ModuleView($module);
136  }
ModuleView($module)
Definition: module_view.inc:57

◆ drawView()

CodeModuleView::drawView (   $cssClass = "")

Definition at line 138 of file module_view.inc.

139  {
140  global $config;
141  global $method;
142  global $user;
143  global $script;
144  global $styles;
145  global $breadcrumbs;
146  global $dialogs;
147  global $page;
148  global $site;
149  global $section;
150  global $menu_identifier;
151  global $identifier;
152  global $section;
153 
154 
155  if ($this->module->php_code_file)
156  {
157  ob_start();
158 
159  try
160  {
161  $codePath = explode(",", $this->module->php_code_file);
162  if (count($codePath) == 2)
163  {
164  $name = $codePath[0];
165  $php_code_file = $codePath[1];
167  if (array_key_exists($name, $components))
168  {
169  $path = $components[$name]->component_path;
171 
172  include $path."/{$php_code_file}";
173 
175  }
176  else
177  {
178  throw new FakoliException("Unknown component");
179  }
180  }
181  else
182  {
184 
185  include $config['homedir']."/{$this->module->php_code_file}";
186 
188  }
189  $output = trim(ob_get_contents());
190  }
191  catch(Exception $e)
192  {
193  $output = $e->__toString();
194  }
195 
196  ob_end_clean();
197  $output = $this->wrap($output);
198  }
199 
200  return $output;
201  }
$section
Definition: event_form.inc:44
$page
Definition: help.inc:39
if(! $page) $path
Definition: page.inc:57
$components
Definition: tree.inc:41
$name
Definition: upload.inc:54
FakoliException is the base exception class for all Fakoli errors.
Definition: core.inc:53
static coreTraceLevel()
Change to the configured trace level for Fakoli core code.
Definition: core.inc:1346
static getComponents()
Retrieve an array of all the currently enabled components, indexed by component name.
Definition: core.inc:206
static applicationTraceLevel()
Change to the configured trace level for application code.
Definition: core.inc:1338
wrap($output)
Definition: module_view.inc:79
global $user
$method
Pull out a simple reference to the request method.
Definition: core.inc:1573
$output
Definition: generate.inc:9
global $config
Definition: import.inc:4
$styles
$identifier
Definition: rss.inc:37

The documentation for this class was generated from the following file: