content
Packages
Interfaces
Classes
Files

Class: SiteMapSection

Source Location: /content/sitemap/site_map_section.class.php [line 37]

Class Overview

SiteMapElement
   |
   --SiteMapSection
This class represents a section of a site map.

Author(s):



Class Details

This class represents a section of a site map.

Tags:

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Methods

constructor SiteMapSection [line 43]

SiteMapSection SiteMapSection( SiteMapLink $link)
Builds a SiteMapSection object

Parameters:

SiteMapLink   $link   The link associated to the section
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method add [line 84]

void add( SiteMapElement $element)
Adds an elemement to the section

Parameters:

SiteMapElement   $element   element to add
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method export [line 105]

string export( &$export_config, SiteMapExportConfig $export_config)
Exports the section according to the given configuration. You will use the following template variables:
  • SECTION_NAME which contains the name of the section
  • SECTION_URL which contains the URL of the link associated to the section
  • DEPTH which contains the depth of the section in the site map tree (useful for CSS classes names)
  • LINK_CODE which contains the code got by the associated link export
  • C_SECTION, boolean meaning that it's a section (useful if you want to use a sigle template for the whole export configuration)
  • A loop "element" containing evert element of the section (their code is available in the CODE variable of the loop)

Tags:

  • return: the exported section

Overridden in child classes as:

ModuleMap::export()
Exports the sitemap (according to a configuration of templates). In your template, you will be able to use the following variables:
  • MODULE_NAME which contains the name of the module
  • MODULE_DESCRIPTION which contains the description of the module
  • MODULE_URL which contains the URL of the module root page
  • DEPTH which is the depth of the module map in the sitemap (generally 1). It might be usefull to apply different CSS styles to each level of depth.
  • LINK_CODE which contains the code of the link associated to the module root exported with the same configuration.
  • C_MODULE_MAP which is a boolean whose value is true, this will enable you to use a single template for the whole export configuration
  • The loop "element" for which the variable CODE contains the code of each sub element of the module (for example categories)

Overrides SiteMapElement::export() (Exports the element)

Parameters:

SiteMapExportConfig   $export_config   Export configuration
   &$export_config  
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_link [line 52]

SiteMapLink get_link( )
Returns the link associated to the section

Tags:

  • return: the link
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_depth [line 70]

void set_depth( int $depth)
Sets the depth of the element

Tags:

  • warning: the description is not protected for XML displaying (but usefulless in sitemap.xml)
Overrides SiteMapElement::set_depth() (Sets the depth of the element)

Parameters:

int   $depth   The depth of the element
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_link [line 61]

void set_link( SiteMapLink $link)
Sets the link associated to the section

Parameters:

SiteMapLink   $link   the link
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Variables

[line 135]   SiteMapElement[]  $elements  = array()

Tags:

    [ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
    [line 131]   SiteMapLink  $link 

    Tags:

      [ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

      Child classes:

      ModuleMap
      The ModuleMap class represents the map of a module. It has a description (generally the module description) and contains some elements which can be some simple links or some sections (which can match the categories for example).

      Inherited Methods

      Class: SiteMapElement

      SiteMapElement::SiteMapElement()
      Builds a SiteMapElement object
      SiteMapElement::export()
      Exports the element
      SiteMapElement::get_depth()
      Returns the depth of the element in the tree
      SiteMapElement::get_name()
      Returns the name of the menu
      SiteMapElement::set_depth()
      Sets the depth of the element


      Documentation generated on Tue, 28 Jul 2009 22:43:42 +0200 by phpDocumentor 1.4.1