Class LayersMenuCommon

Description

This is the "common" class of the PHP Layers Menu library.

You need to include PEAR.php and DB.php if (and only if) you want to use the DB support provided by ths class.

  • version: 3.2.0-rc

Located in /smarty/plugins/menuLayer/lib/layersmenu-common.inc.php (line 17)


	
			
Direct descendents
Class Description
TreeMenu This is the TreeMenu class of the PHP Layers Menu library.
PHPTreeMenu This is the PHPTreeMenu class of the PHP Layers Menu library.
LayersMenu This is the LayersMenu class of the PHP Layers Menu library.
PlainMenu This is the PlainMenu class of the PHP Layers Menu library.
ProcessLayersMenu This is an extension of the "common" class of the PHP Layers Menu library.
Method Summary
void parseStructureForMenu ([string $menu_name = ''])
void replaceStringInUrls (string $menu_name, string $string, string $value)
void scanTableForMenu ([string $menu_name = ''], [string $language = ''])
boolean setDBConnParms (string $dsn, [bool $persistent = false])
boolean setDirrootCommon ( $dirroot)
boolean setIcondir ( $icondir)
void setIconsize ( $width,  $height)
void setIconwww ( $iconwww)
boolean setImgdir ( $imgdir)
void setImgwww ( $imgwww)
boolean setLibjsdir ( $libjsdir)
void setLinksTargets (string $menu_name, string $target)
boolean setMenuStructureFile (string $tree_file)
boolean setMenuStructureString (string $tree_string)
boolean setPrependedUrl ( $prependedUrl)
void setSelectedItemByCount (string $menu_name, integer $count)
void setSelectedItemById (string $menu_name, integer $id)
void setSelectedItemByUrl (string $menu_name, string $url)
void setSelectedItemByUrlEregi (string $menu_name, string $url_eregi)
void setSeparator ( $separator)
boolean setTableFields (array $tableFields)
boolean setTableFields_i18n (array $tableFields_i18n)
boolean setTableName (string $tableName)
boolean setTableName_i18n (string $tableName_i18n)
boolean setTpldirCommon ( $tpldir)
void unsetIconsize ()
void _getmicrotime ()
Methods
Constructor LayersMenuCommon (line 233)

The constructor method; it initializates the menu system

void LayersMenuCommon ()
parseStructureForMenu (line 612)

The method to parse the current menu structure and correspondingly update related variables

  • access: public
void parseStructureForMenu ([string $menu_name = ''])
  • string $menu_name: the name to be attributed to the menu whose structure has to be parsed
replaceStringInUrls (line 837)

A method to replace strings in all URLs (hrefs) of a menu

  • access: public
void replaceStringInUrls (string $menu_name, string $string, string $value)
  • string $menu_name: the name of the menu for which the replacement has to be performed
  • string $string: the string to be replaced
  • string $value: the replacement string
scanTableForMenu (line 666)

The method to parse the current menu table and correspondingly update related variables

  • access: public
void scanTableForMenu ([string $menu_name = ''], [string $language = ''])
  • string $menu_name: the name to be attributed to the menu whose structure has to be parsed
  • string $language: i18n language; either omit it or pass an empty string ('') if you do not want to use any i18n table
setDBConnParms (line 512)

The method to set parameters for the DB connection

  • access: public
boolean setDBConnParms (string $dsn, [bool $persistent = false])
  • string $dsn: Data Source Name: the connection string for PEAR DB
  • bool $persistent: DB connections are either persistent or not persistent
setDirrootCommon (line 278)

The method to set the dirroot directory

  • access: public
boolean setDirrootCommon ( $dirroot)
  • $dirroot
setIcondir (line 374)

The method to set the icondir directory

  • access: public
boolean setIcondir ( $icondir)
  • $icondir
setIconsize (line 411)

The method to set the iconsize array

  • access: public
void setIconsize ( $width,  $height)
  • $width
  • $height
setIconwww (line 398)

The method to set iconwww

  • access: public
void setIconwww ( $iconwww)
  • $iconwww
setImgdir (line 337)

The method to set the imgdir directory

  • access: public
boolean setImgdir ( $imgdir)
  • $imgdir
setImgwww (line 361)

The method to set imgwww

  • access: public
void setImgwww ( $imgwww)
  • $imgwww
setLibjsdir (line 313)

The method to set the libjsdir directory

  • access: public
boolean setLibjsdir ( $libjsdir)
  • $libjsdir
setLinksTargets (line 853)

A method to set the same target for all links of a menu

  • access: public
void setLinksTargets (string $menu_name, string $target)
  • string $menu_name: the name of the menu for which the targets have to be set
  • string $target: the target to be set for all links of the $menu_name menu
setMenuStructureFile (line 460)

The method to read the menu structure from a file

  • access: public
boolean setMenuStructureFile (string $tree_file)
  • string $tree_file: the menu structure file
setMenuStructureString (line 485)

The method to set the menu structure passing it through a string

  • access: public
boolean setMenuStructureString (string $tree_string)
  • string $tree_string: the menu structure string
setPrependedUrl (line 266)

The method to set the prepended URL

  • access: public
boolean setPrependedUrl ( $prependedUrl)
  • $prependedUrl
setSelectedItemByCount (line 870)

A method to select the current item of $menu_name in terms of $cnt, i.e., very likely, in terms of its line number in the corresponding menu structure file (excluding from the count commented out lines, if any)

  • access: public
void setSelectedItemByCount (string $menu_name, integer $count)
  • string $menu_name: the name of the menu for which the current item has to be selected
  • integer $count: the line number of the current item in the corresponding menu structure file (excluding from the count commented out lines, if any)
setSelectedItemById (line 892)

A method to select the current item of $menu_name in terms of the corresponding id (see the DB table structure); obviously, this method can be used only together with the DB support

  • access: public
void setSelectedItemById (string $menu_name, integer $id)
  • string $menu_name: the name of the menu for which the current item has to be selected
  • integer $id: the id of the current item in the corresponding DB table
setSelectedItemByUrl (line 910)

A method to select the current item of $menu_name specifying a string that occurs in the current URL

  • access: public
void setSelectedItemByUrl (string $menu_name, string $url)
  • string $menu_name: the name of the menu for which the current item has to be selected
  • string $url: a string that occurs in the current URL
setSelectedItemByUrlEregi (line 929)

A method to select the current item of $menu_name specifying a regular expression that matches (a substring of) the current URL; just the same as the setSelectedItemByUrl() method, but using eregi() instead of strpos()

  • access: public
void setSelectedItemByUrlEregi (string $menu_name, string $url_eregi)
  • string $menu_name: the name of the menu for which the current item has to be selected
  • string $url_eregi: the regular expression that matches (a substring of) the current URL
setSeparator (line 500)

The method to set the value of separator

  • access: public
void setSeparator ( $separator)
  • $separator
setTableFields (line 565)

The method to set names of fields of the table storing data describing the menu

  • access: public
boolean setTableFields (array $tableFields)
  • array $tableFields
setTableFields_i18n (line 588)

The method to set names of fields of the i18n table corresponding to $tableName

  • access: public
boolean setTableFields_i18n (array $tableFields_i18n)
  • array $tableFields_i18n
setTableName (line 533)

The method to set the name of the table storing data describing the menu

  • access: public
boolean setTableName (string $tableName)
  • string $tableName
setTableName_i18n (line 549)

The method to set the name of the i18n table corresponding to $tableName

  • access: public
boolean setTableName_i18n (string $tableName_i18n)
  • string $tableName_i18n
setTpldirCommon (line 435)

The method to set the tpldir directory

  • access: public
boolean setTpldirCommon ( $tpldir)
  • $tpldir
unsetIconsize (line 423)

The method to unset the iconsize array

  • access: public
void unsetIconsize ()
_getmicrotime (line 737)
void _getmicrotime ()

Documentation generated on Wed, 05 Oct 2011 10:36:40 +0200 by phpDocumentor 1.4.1