Source for file WebsiteNavigation.class.php
Documentation is available at WebsiteNavigation.class.php
* For including this file you have to define the constant "CLASSPATH".
* Because every include in the framework depends on the CLASSPATH definition.
* The CLASSPATH means the relative path to the folder that contains the
echo "<h3>You have to define the constant CLASSPATH!</h3>\n";
echo "Example: define( 'CLASSPATH', '../path/to/classes/' );\n";
* Including the list class.
require_once CLASSPATH. "html/HTMLList.class.php";
* Including the link class.
include_once CLASSPATH. "html/HTMLLink.class.php";
* A class to generate the navigation of a website.
* @author Daniel Plücken <daniel@debakel.net>
* @license http://www.gnu.org/copyleft/lesser.html
* GNU Lesser General Public License
* @copyright Copyright (c) 2006 Daniel Plücken <daniel@debakel.net>
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA
* @var array $str_style_on_mouseup_arr
* @var array $str_style_on_mouseover_arr
* @var array $str_value_arr
* @author Daniel Plücken <daniel@debakel.net>
* @param array $label_arr
* @param array $href_arr Use the placeholder [value] to place
* the the corresponding value from the
* @param array $value_arr
* @param array $style_class_arr
* @param array $link_style_class_arr
* @param array $freestyle_arr
* @param array $link_freestyle_arr
* @param array $target_arr
* @return WebsiteNavigation
$style_class_arr = array(),
$link_style_class_arr = array(),
$freestyle_arr = array(),
$link_freestyle_arr = array(),
foreach ( $label_arr as $key => $value )
$link_style_class_arr[$key],
$link_freestyle_arr[$key],
* Sets the style that should be used on mouseup for each element.
* @author Daniel Plücken <daniel@debakel.net>
* @param string $str_style_class
foreach ( $this->list_arr as $key => $value )
* Sets the style that should be used on mouseover for each element.
* @author Daniel Plücken <daniel@debakel.net>
* @param string $str_style_class
foreach ( $this->list_arr as $key => $value )
* Sets the style of the a list item identified by his given value.
* @author Daniel Plücken <daniel@debakel.net>
* @param string $str_value
* @param string $str_style_class
* @param string $str_link_style_class
* @param string $str_freestyle
* @param string $str_link_freestyle
$str_link_style_class = "",
foreach ( $this->list_arr as $key => $value )
$this->list_arr[$key]->setStyle( $str_link_style_class );
$this->list_arr[$key]->setFreeStyle( $str_link_freestyle );
* Sets the style of the a list item identified by his given value. This
* function is an alias for the function setMarkedValue.
* @author Daniel Plücken <daniel@debakel.net>
* @param string $str_value
* @param string $str_style_class
* @param string $str_link_style_class
* @param string $str_freestyle
* @param string $str_link_freestyle
$str_link_style_class = "",
* Adds a navigation point to the list.
* @author Daniel Plücken <daniel@debakel.net>
* @param string $str_label
* @param string $str_href Use the placeholder [value] to
* place the the corresponding value.
* @param string $str_value
* @param string $str_style_class
* @param string $str_link_style_class
* @param string $str_freestyle
* @param string $str_link_freestyle
* @param string $str_target
* @return integer The insert position.
$str_link_style_class = "",
$str_link_freestyle = "",
$tmp_a_obj->setFreeStyle( $str_link_freestyle );
* Removes the element at $int-index. All elements behind the deleted element
* moving up by one position.
* @author Daniel Plücken <daniel@debakel.net>
* @param integer $int Index of the element to remove.
* Returns a generated string based on the attributes of this HTML-Object.
* @author Daniel Plücken <daniel@debakel.net>
$this->mouseup_arr[$key] .= "this.className='". $value. "'";
$style_class_arr[$key] = $this->str_selected_style;
} // End of class WebsiteNavigation
|