![]() |
Documentación GVHIDRA 3.1.5
|
Métodos públicos | |
PlainMenu () | |
setDirroot ($dirroot) | |
setTpldir ($tpldir) | |
updateTpldir ($oldtpldir) | |
setPlainMenuTpl ($plainMenuTpl) | |
newPlainMenu ($menu_name= '') | |
getPlainMenu ($menu_name) | |
printPlainMenu ($menu_name) | |
setHorizontalPlainMenuTpl ($horizontalPlainMenuTpl) | |
newHorizontalPlainMenu ($menu_name= '') | |
getHorizontalPlainMenu ($menu_name) | |
printHorizontalPlainMenu ($menu_name) | |
Campos de datos | |
$plainMenuTpl | |
$_plainMenu | |
$horizontalPlainMenuTpl | |
$_horizontalPlainMenu |
Definición en la línea 17 del archivo plainmenu.inc.php.
getHorizontalPlainMenu | ( | $ | menu_name | ) |
Method that returns the code of the requested Horizontal Plain Menu public
string | $menu_name | the name of the menu whose Horizontal Plain Menu code has to be returned |
Definición en la línea 262 del archivo plainmenu.inc.php.
{
return $this->_horizontalPlainMenu[$menu_name];
}
getPlainMenu | ( | $ | menu_name | ) |
Method that returns the code of the requested Plain Menu public
string | $menu_name | the name of the menu whose Plain Menu code has to be returned |
Definición en la línea 171 del archivo plainmenu.inc.php.
{
return $this->_plainMenu[$menu_name];
}
newHorizontalPlainMenu | ( | $ | menu_name = '' | ) |
Method to prepare a new Horizontal Plain Menu.
This method processes items of a menu to prepare and return the corresponding Horizontal Plain Menu code.
public
string | $menu_name | the name of the menu whose items have to be processed |
Definición en la línea 216 del archivo plainmenu.inc.php.
{ $horizontal_plain_menu_blck = ''; $t = new Template_PHPLIB(); $t->setFile('tplfile', $this->horizontalPlainMenuTpl); $t->setBlock('tplfile', 'template', 'template_blck'); $t->setBlock('template', 'horizontal_plain_menu_cell', 'horizontal_plain_menu_cell_blck'); $t->setVar('horizontal_plain_menu_cell_blck', ''); $t->setBlock('horizontal_plain_menu_cell', 'plain_menu_cell', 'plain_menu_cell_blck'); $t->setVar('plain_menu_cell_blck', ''); for ($cnt=$this->_firstItem[$menu_name]; $cnt<=$this->_lastItem[$menu_name]; $cnt++) { if ($this->tree[$cnt]['text'] == '---') { continue; // separators are significant only for layers-based menus } if ($this->tree[$cnt]['level'] == 1 && $cnt > $this->_firstItem[$menu_name]) { $t->parse('horizontal_plain_menu_cell_blck', 'horizontal_plain_menu_cell', true); $t->setVar('plain_menu_cell_blck', ''); } $nbsp = ''; for ($i=1; $i<$this->tree[$cnt]['level']; $i++) { $nbsp .= ' '; } $t->setVar(array( 'nbsp' => $nbsp, 'href' => $this->tree[$cnt]['parsed_href'], 'title' => $this->tree[$cnt]['parsed_title'], 'target' => $this->tree[$cnt]['parsed_target'], 'text' => $this->tree[$cnt]['parsed_text'] )); $t->parse('plain_menu_cell_blck', 'plain_menu_cell', true); } $t->parse('horizontal_plain_menu_cell_blck', 'horizontal_plain_menu_cell', true); $this->_horizontalPlainMenu[$menu_name] = $t->parse('template_blck', 'template'); return $this->_horizontalPlainMenu[$menu_name]; }
newPlainMenu | ( | $ | menu_name = '' | ) |
Method to prepare a new Plain Menu.
This method processes items of a menu to prepare and return the corresponding Plain Menu code.
public
string | $menu_name | the name of the menu whose items have to be processed |
Definición en la línea 131 del archivo plainmenu.inc.php.
{ $plain_menu_blck = ''; $t = new Template_PHPLIB(); $t->setFile('tplfile', $this->plainMenuTpl); $t->setBlock('tplfile', 'template', 'template_blck'); $t->setBlock('template', 'plain_menu_cell', 'plain_menu_cell_blck'); $t->setVar('plain_menu_cell_blck', ''); for ($cnt=$this->_firstItem[$menu_name]; $cnt<=$this->_lastItem[$menu_name]; $cnt++) { if ($this->tree[$cnt]['text'] == '---') { continue; // separators are significant only for layers-based menus } $nbsp = ''; for ($i=1; $i<$this->tree[$cnt]['level']; $i++) { $nbsp .= ' '; } $t->setVar(array( 'nbsp' => $nbsp, 'href' => $this->tree[$cnt]['parsed_href'], 'title' => $this->tree[$cnt]['parsed_title'], 'target' => $this->tree[$cnt]['parsed_target'], 'text' => $this->tree[$cnt]['parsed_text'] )); $plain_menu_blck .= $t->parse('plain_menu_cell_blck', 'plain_menu_cell', false); } $t->setVar('plain_menu_cell_blck', $plain_menu_blck); $this->_plainMenu[$menu_name] = $t->parse('template_blck', 'template'); return $this->_plainMenu[$menu_name]; }
PlainMenu | ( | ) |
The constructor method; it initializates some variables
Definición en la línea 46 del archivo plainmenu.inc.php.
{ $this->LayersMenuCommon(); $this->plainMenuTpl = $this->tpldir . 'layersmenu-plain_menu.ihtml'; $this->_plainMenu = array(); $this->horizontalPlainMenuTpl = $this->tpldir . 'layersmenu-horizontal_plain_menu.ihtml'; $this->_horizontalPlainMenu = array(); }
printHorizontalPlainMenu | ( | $ | menu_name | ) |
Method that prints the code of the requested Horizontal Plain Menu public
string | $menu_name | the name of the menu whose Horizontal Plain Menu code has to be printed |
Definición en la línea 274 del archivo plainmenu.inc.php.
{ print $this->_horizontalPlainMenu[$menu_name]; }
printPlainMenu | ( | $ | menu_name | ) |
Method that prints the code of the requested Plain Menu public
string | $menu_name | the name of the menu whose Plain Menu code has to be printed |
Definición en la línea 183 del archivo plainmenu.inc.php.
{ print $this->_plainMenu[$menu_name]; }
setDirroot | ( | $ | dirroot | ) |
The method to set the dirroot directory public
Definición en la línea 62 del archivo plainmenu.inc.php.
{ $oldtpldir = $this->tpldir; if ($foobar = $this->setDirrootCommon($dirroot)) { $this->updateTpldir($oldtpldir); } return $foobar; }
setHorizontalPlainMenuTpl | ( | $ | horizontalPlainMenuTpl | ) |
The method to set horizontalPlainMenuTpl public
Definición en la línea 193 del archivo plainmenu.inc.php.
{ if (str_replace('/', '', $horizontalPlainMenuTpl) == $horizontalPlainMenuTpl) { $horizontalPlainMenuTpl = $this->tpldir . $horizontalPlainMenuTpl; } if (!file_exists($horizontalPlainMenuTpl)) { $this->error("setHorizontalPlainMenuTpl: file $horizontalPlainMenuTpl does not exist."); return false; } $this->horizontalPlainMenuTpl = $horizontalPlainMenuTpl; return true; }
setPlainMenuTpl | ( | $ | plainMenuTpl | ) |
The method to set plainMenuTpl public
Definición en la línea 108 del archivo plainmenu.inc.php.
{ if (str_replace('/', '', $plainMenuTpl) == $plainMenuTpl) { $plainMenuTpl = $this->tpldir . $plainMenuTpl; } if (!file_exists($plainMenuTpl)) { $this->error("setPlainMenuTpl: file $plainMenuTpl does not exist."); return false; } $this->plainMenuTpl = $plainMenuTpl; return true; }
setTpldir | ( | $ | tpldir | ) |
The method to set the tpldir directory public
Definición en la línea 76 del archivo plainmenu.inc.php.
{ $oldtpldir = $this->tpldir; if ($foobar = $this->setTpldirCommon($tpldir)) { $this->updateTpldir($oldtpldir); } return $foobar; }
updateTpldir | ( | $ | oldtpldir | ) |
The method to update the templates directory path to the new tpldir private
Definición en la línea 90 del archivo plainmenu.inc.php.
{ $oldlength = strlen($oldtpldir); $foobar = strpos($this->plainMenuTpl, $oldtpldir); if (!($foobar === false || $foobar != 0)) { $this->plainMenuTpl = $this->tpldir . substr($this->plainMenuTpl, $oldlength); } $foobar = strpos($this->horizontalPlainMenuTpl, $oldtpldir); if (!($foobar === false || $foobar != 0)) { $this->horizontalPlainMenuTpl = $this->tpldir . substr($this->horizontalPlainMenuTpl, $oldlength); } }
$_horizontalPlainMenu |
Definición en la línea 40 del archivo plainmenu.inc.php.
$_plainMenu |
Definición en la línea 29 del archivo plainmenu.inc.php.
$horizontalPlainMenuTpl |
The template to be used for the Horizontal Plain Menu
Definición en la línea 34 del archivo plainmenu.inc.php.
$plainMenuTpl |
The template to be used for the Plain Menu
Definición en la línea 23 del archivo plainmenu.inc.php.