Class WFBreadCrumbSetup

Description

A Breadcrumb system.

WFBreadCrumbSetup manages the object graph which makes up the breadcrumb architecture.

You can add as many nodes as you like to the breadcrumb setup; you can even create complex branched trees. However, while a single class can have multiple classes pointing to it, of course a single class can only point to one class (the parent).

The resulting object graph is used to calculate a breadcrumb from any given object that appear in the graph.

Located in /framework/widgets/WFBreadCrumb.php (line 229)

WFObject
   |
   --WFBreadCrumbSetup
Variable Summary
array $graph
array $nodes
mixed $rootLabel
mixed $rootURL
mixed $separator
Method Summary
WFBreadCrumbSetup __construct ()
array getBreadCrumb (object WFObject $object)
string renderBreadCrumb (object WFObject $object)
object WFBreadCrumbSetup setRoot (string $label, [string $url = NULL])
Variables
array $graph (line 234)
  • var: A hash of parentClassName => childClassName.
  • access: protected
array $nodes (line 238)
  • var: A hash of className => object WFBreadCrumbNode to quickly map a given object to the node that handles it.
  • access: protected
mixed $rootLabel (line 240)
  • access: protected
mixed $rootURL (line 241)
  • access: protected
mixed $separator (line 243)
  • access: protected
Methods
static method BreadCrumbSetup (line 259)

Static constructor for fluent interfaces.

  • access: public
static object WFBreadCrumbSetup BreadCrumbSetup ()
Constructor __construct (line 245)
WFBreadCrumbSetup __construct ()

Redefinition of:
WFObject::__construct()
addBreadCrumbNode (line 296)

Add a WFBreadCrumbNode to the object graph.

  • access: public
object WFBreadCrumbSetup addBreadCrumbNode (object WFBreadCrumbNode $bcNode)
getBreadCrumb (line 318)

Calculate the breadcrumb info.

  • return: A hash of title => url for all items in the breadcrumb.
  • access: public
array getBreadCrumb (object WFObject $object)
  • object WFObject $object: The instance to create the breadcrumb for.
renderBreadCrumb (line 362)

Render the bread crumb into HTML.

  • return: The HTML for the breadcrumb.
  • access: public
string renderBreadCrumb (object WFObject $object)
  • object WFObject $object: The instance to create the breadcrumb for.
setRoot (line 271)

Set the "root" node of the object graph. This is used whenever the parent is NULL.

  • access: public
object WFBreadCrumbSetup setRoot (string $label, [string $url = NULL])
  • string $label: The label to display at the "root" of the breadcrumb.
  • string $url: The link for the root. OPTIONAL, default NULL.
setSeparator (line 284)

Set the HTML separator code.

  • access: public
object WFBreadCrumbSetup setSeparator (string $sep)
  • string $sep: HTML separator. Default is '>'.

Inherited Methods

Inherited From WFObject

WFObject::__construct()
WFObject::exposedProperties()
WFObject::getClass()
WFObject::keyPathToTargetAndKey()
WFObject::setValueForKey()
WFObject::setValueForKeyPath()
WFObject::setValuesForKeys()
WFObject::validatedSetValueForKey()
WFObject::validatedSetValueForKeyPath()
WFObject::validateObject()
WFObject::validateValueForKey()
WFObject::validateValueForKeyPath()
WFObject::valueForKey()
WFObject::valueForKeyPath()
WFObject::valueForStaticKey()
WFObject::valueForStaticKeyPath()
WFObject::valueForTargetAndKeyPath()
WFObject::valueForUndefinedKey()
WFObject::valueForUndefinedStaticKey()
WFObject::valuesForKeyPaths()
WFObject::valuesForKeys()
WFObject::_valueForStaticKey()
WFObject::__toString()

Documentation generated on Thu, 14 May 2009 16:19:49 -0400 by phpDocumentor 1.4.2