Class: TemplateSelect

Source Location: /CORE/system/classes/util/formular/TemplateSelect.php

Class TemplateSelect

Class Overview

This class defines a HTML Select Box for all installed SmartyTemplates.

You can choose whether deactivated (in work) Templates should be shown. You can choose whether Includes should be shown or not. You can choose which Template is preselected. You can choose if Templates are sorted in alphabetical order.

Set all values and call

.

Located in /CORE/system/classes/util/formular/TemplateSelect.php [line 46]

HtmlElement
   |
   --Select
      |
      --TemplateSelect
Author(s):
  • Kevin Papst
Information Tags:
Version:  $Id: TemplateSelect.php,v 1.3 2007/07/22 23:28:38 kpapst Exp $
Copyright:  Copyright (C) 2002-2006 Kevin Papst
License:  GNU Public License

Methods

[ Top ]
Method Summary
TemplateSelect   TemplateSelect()  
void   setPreSelected()   Sets the Name of the Template that should be preselected.
void   setShowDeactivated()   Sets whether deactivated Templates are rendered or not.
void   setShowIncludes()   Sets whether Includes will be shown or not.
void   setShowPreselectedIfDeactivated()   Sets whether the Preselected Template will be rendered if it is deactivated or not. Default is TRUE.
void   setShowSystemTemplates()   Sets whether System Templates will be shown or not.
void   setSortAlphabetical()   Sets if the list will be sorted alphabetical.

[ Top ]
Methods
Constructor TemplateSelect  [line 74]

  TemplateSelect TemplateSelect( )



[ Top ]
setPreSelected  [line 84]

  void setPreSelected( String $template  )

Sets the Name of the Template that should be preselected.

If this Template is deactivated, it will be rendered nevertheless. This behaviour can be changed by calling setShowPreselectedIfDeactivated($show).

Parameters:
String   $template:  id the Template Name


[ Top ]
setShowDeactivated  [line 102]

  void setShowDeactivated( boolean $showDeactivated  )

Sets whether deactivated Templates are rendered or not.

Default is FALSE.

Parameters:
boolean   $showDeactivated:  showDeactivated whether deactivated Templates will be rendered


[ Top ]
setShowIncludes  [line 120]

  void setShowIncludes( boolean $showIncludes  )

Sets whether Includes will be shown or not.

Default is FALSE.

Parameters:
boolean   $showIncludes:  showDeactivated whether Includes will be rendered


[ Top ]
setShowPreselectedIfDeactivated  [line 130]

  void setShowPreselectedIfDeactivated( boolean $show  )

Sets whether the Preselected Template will be rendered if it is deactivated or not. Default is TRUE.

Set FALSE if you do not want to display the preselected and deactivated Template.

Parameters:
boolean   $show:  show whether deactivated and preselected Template will be rendered


[ Top ]
setShowSystemTemplates  [line 111]

  void setShowSystemTemplates( boolean $showSystem  )

Sets whether System Templates will be shown or not.

Default is FALSE.

Parameters:
boolean   $showSystem:  showSystem whether System Templates will be rendered


[ Top ]
setSortAlphabetical  [line 93]

  void setSortAlphabetical( boolean $sortAlphabetical  )

Sets if the list will be sorted alphabetical.

Default id TRUE.

Parameters:
boolean   $sortAlphabetical:  sortAlphabetical if the list will be sorted or not


[ Top ]