Class template

Description

This class contains methods that prints out to the template system, the template system is what the user see when using your application.

This means everything that is supposed to echo to the users browser is done with this class. This class resides in the global variable $template and these methods can be called by $template->call_any_method(). Stop Here

  • author: Jason Schoeman
  • version: 1.0.2 (greg)
  • deprecated:
  • since: 2007/01/03

Located in /legacy/template.class.php (line 22)

PHPDS_dependant
   |
   --template
Direct descendents
Class Description
PHPDS_template PHPDevShell is a RAD Framework aimed at developing administrative applications.
Variable Summary
Method Summary
void alt_color (mixed $alt)
void assign (mixed $var, mixed $value)
void display ([string $load_template = false], [string $plugin = false])
void dofetch (string $var, string $value)
integer extend_menu_loop (integer $extended_menu_id)
void fetch (string $var, string $value)
string get_template ()
void hook (integer $hook_point_id)
string html_entity_decode (string $string_to_decode)
void iconize (string $img, string $text)
void info_mark (string $info_mark, [boolean $print = false])
void load_icons ()
void login_emplate (string $goto, [integer $redirect = false], [boolean $return = false])
void out (string $variable)
void output_charset ([ $return = false])
void output_footer ()
void output_language ([ $return = false])
void output_logo ()
void output_menu ()
void output_script ()
void output_title ()
void random_color (int $id)
void result ( $RESULT, [integer $colspan = 0], string $RESULTS)
void script_logo (string $menu_link, string $active_plugin, [ $alias = null])
void set (mixed $var, mixed $value)
void show ([string $load_template = false], [string $plugin = false])
Variables
string $active_language (line 35)

Contains active language identifier being used.

  • access: public
string $cron_output (line 29)

When this variable is assigned, the cronjob will output to his template system if it is enabled in the config.

  • access: public
string $HOOK = '' (line 112)

Contains script HOOK data.

  • access: public
array $hook_array (line 78)

Contains array with existing registered hook points for active script.

  • access: public
string $hook_request (line 94)

The hook position id (head, foot, aaa, etc...) that is being required in main script.

This helps the developer split its code to only a specific hook area.

Example:

  1.  if ($template->hook_request 'head')
  2.  {
  3.          // Do head code here.
  4.  }

  • access: public
string $HTML = '' (line 106)

Contains script HTML data.

  • access: public
string $modify_output_active_info = false (line 48)

Use this variable to modify the output templates active info.

  • access: public
string $modify_output_breadcrumbs = false (line 54)

Use this variable to modify the output templates breadcrumbs.

  • access: public
string $modify_output_footer = false (line 72)

Use this variable to modify the output templates footer.

  • access: public
string $modify_output_menu = false (line 60)

Use this variable to modify the output templates menu.

  • access: public
string $modify_output_script = false (line 66)

Use this variable to modify the output templates script.

  • access: public
string $modify_output_title = false (line 42)

Use this variable to modify the output templates title.

  • access: public
object $view (line 118)

Use to manage the view class.

  • access: public

Inherited Variables

Inherited from PHPDS_dependant

PHPDS_dependant::$dependance
PHPDS_dependant::$parent
Methods
alt_color (line 662)

Does the alternating colors of rows when there is more then 1 result. Intended to be used by the developer.

  • author: Jason Schoeman
  • access: public
void alt_color (mixed $alt)
  • mixed $alt: The value of the previous row.
assign (line 871)

Sets Smarty variables to be passed to it.

Alias of assign.

  • access: public
void assign (mixed $var, mixed $value)
  • mixed $var
  • mixed $value
display (line 847)

Loads the default or custom template (tpl) file and prints it out.

Enter the template file for appropriate script here.

  • access: public
void display ([string $load_template = false], [string $plugin = false])
  • string $load_template: The name of the template to be loaded
  • string $plugin: If another plugin is to be used in the directory.
dofetch (line 883)

Loads the default or custom template (tpl) file and returns results.

Enter the template file for appropriate script here.

  • access: public
void dofetch (string $var, string $value)
  • string $var: The name of the template to be loaded
  • string $value: If another plugin is to be used in the directory.
extend_menu_loop (line 263)

This function support output_script by looking deeper into menu structure to find last linked menu item that is not linked to another.

  • deprecated:
  • access: public
integer extend_menu_loop (integer $extended_menu_id)
  • integer $extended_menu_id
fetch (line 895)

Loads the default or custom template (tpl) file and returns results.

Enter the template file for appropriate script here.

  • access: public
void fetch (string $var, string $value)
  • string $var: The name of the template to be loaded
  • string $value: If another plugin is to be used in the directory.
get_template (line 745)

Get and return the supposed to run template.

  • return: if not found, return default.
  • author: Jason Schoeman
  • access: public
string get_template ()
hook (line 542)

The exact location where hook should be applied.

  • access: public
void hook (integer $hook_point_id)
  • integer $hook_point_id: The unique id given to a hook.
html_entity_decode (line 906)

Convert all HTML entities to their applicable characters.

  • access: public
string html_entity_decode (string $string_to_decode)
  • string $string_to_decode
iconize (line 617)

Will pick image or text icon depending on print or fast mode.

  • author: Jason Schoeman
  • access: public
void iconize (string $img, string $text)
  • string $img: The url of the image icon to display.
  • string $text: The alternative text if in fast mode.
info_mark (line 633)

This creates an the [i] when over with mouse a popup with a message appears, this can be placed anywhere. Intended to be used by the developer.

  • author: Jason Schoeman
  • access: public
void info_mark (string $info_mark, [boolean $print = false])
  • string $info_mark: The message to diplay when mouse goes over the [i].
  • boolean $print: Sets to print out confirm link instead of return.
load_icons (line 728)

Will load template icons and assign to lang array.

  • access: public
void load_icons ()
login_emplate (line 778)

Loads the username & password html template form.

  • deprecated:
  • access: public
void login_emplate (string $goto, [integer $redirect = false], [boolean $return = false])
  • string $goto
  • integer $redirect
  • boolean $return
out (line 651)

Print out any message given to it (instead of return). Intended to be used by the developer.

  • author: Jason Schoeman
  • access: public
void out (string $variable)
  • string $variable: Message to print out.
output_active_info (line 202)

Returns "users version number" and some other detail to the template system. Intended to be used by the engine.

  • author: Jason Schoeman
  • access: public
void output_active_info ()
output_breadcrumbs (line 231)

Returns "breadcrumbs" to the template system. Intended to be used by the engine.

  • author: Jason Schoeman
  • access: public
void output_breadcrumbs ()
output_charset (line 142)

Outputs charset.

  • author: Jason Schoeman
  • access: public
void output_charset ([ $return = false])
  • $return
output_footer (line 588)

Returns the last footer string to the template system. Intended to be used by the engine.

  • author: Jason Schoeman
  • access: public
void output_footer ()
output_language (line 126)

Outputs current language identifier being used.

  • author: Jason Schoeman
  • access: public
void output_language ([ $return = false])
  • $return
output_logo (line 177)

Gets the desired logo and displays it. This method will try its best to deliver a logo, whatever the case.

  • author: Jason Schoeman
  • access: public
void output_logo ()
output_menu (line 246)

Returns "menus" to the template system. Intended to be used by the engine.

  • author: Jason Schoeman
  • access: public
void output_menu ()
output_script (line 273)

Returns "output script" to the template system. Intended to be used by the engine.

  • author: Jason Schoeman
  • access: public
void output_script ()
output_title (line 158)

Outputs the active scripts title.

  • author: Jason Schoeman
  • access: public
void output_title ()
random_color (line 677)

Creates a random soft color by group. Intended to be used by the developer.

  • author: Jason Schoeman
  • access: public
void random_color (int $id)
  • int $id: Unique id of the group which needs a color.
result (line 715)

Output "no results found" if no results are found in a paging script.

  • since: 2007/04/16
  • access: public
void result ( $RESULT, [integer $colspan = 0], string $RESULTS)
  • string $RESULTS
  • integer $colspan
  • $RESULT
script_logo (line 823)

Acquire script identification image or logo.

  • deprecated:
  • access: public
void script_logo (string $menu_link, string $active_plugin, [ $alias = null])
  • string $menu_link
  • string $active_plugin
  • $alias
set (line 859)

Sets Smarty variables to be passed to it.

Alias of assign.

  • access: public
void set (mixed $var, mixed $value)
  • mixed $var
  • mixed $value
show (line 835)

Loads the default or custom template (tpl) file and prints it out.

Enter the template file for appropriate script here.

  • access: public
void show ([string $load_template = false], [string $plugin = false])
  • string $load_template: The name of the template to be loaded
  • string $plugin: If another plugin is to be used in the directory.
template_cron_output (line 703)

Outputs data to the cron template if cron debug is enabled in the configuration.

  • author: Jason Schoeman
  • access: public
void template_cron_output ()

Inherited Methods

Inherited From PHPDS_dependant

PHPDS_dependant::__construct()
PHPDS_dependant::construct()
PHPDS_dependant::debugInstance()
PHPDS_dependant::factory()
PHPDS_dependant::factoryWith()
PHPDS_dependant::info()
PHPDS_dependant::log()
PHPDS_dependant::PHPDS_dependance()
PHPDS_dependant::_log()
PHPDS_dependant::__call()
PHPDS_dependant::__get()
PHPDS_dependant::__set()

Documentation generated on Tue, 09 Aug 2011 09:05:37 +0200 by phpDocumentor 1.4.3