Changeset 31 for Utilities

Show
Ignore:
Timestamp:
07/11/2007 03:30:26 AM (18 months ago)
Author:
tof
Message:

CSitemapPath: override AddParsedObject? method to add body of component at the end of current path

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Utilities/CSitemap/trunk/src/CSitemap/CSitemapPath.php

    r30 r31  
    1313 * CSitemapPath class 
    1414 *  
    15  * TODO: documentation ! 
     15 * This control is a bread crumb, looking for the current path in the sitemap module manager 
     16 * It needs the CsitemapManager module to be loaded in your application.xml 
     17 *  
     18 * You can specify a CSitemapSeparatorClass to provide a new component for separator (must be a TWebControl) 
     19 * By default, CSitemapSeparator just draw a static > 
     20 *  
    1621 */ 
    1722class CSitemapPath extends TCompositeControl { 
     
    4348        public function setSeparatorClass ($value)  
    4449        { 
    45                 if (prado::createComponent($value) instanceof CSitemapNodeSeparator) 
     50                if (prado::createComponent($value) instanceof TWebControl) 
    4651                        $this->setViewState('separatorClass', TPropertyValue::ensureString($value)); 
    4752                else  
    48                         throw new TInvalidDataValueException ('SeparatorClass must be an instance of CSitemapNodeSeparator'); 
     53                        throw new TInvalidDataValueException ('SeparatorClass must be an instance of TWebControl'); 
    4954        } 
    5055         
     
    7378                } 
    7479                parent::createChildControls(); 
     80        } 
     81         
     82        public function addParsedObject ($object) 
     83        { 
     84                $this->ensureChildControls(); 
     85                parent::addParsedObject ($object); 
    7586        } 
    7687