Methods

Constructor.

__construct(DB_Contenido $oDb, array $aCfg, int $iClient, int $iLang, array $aCfgClient) : void

access public
author Rudi Bieller

Parameters

$aCfg

array

$iClient

int

$iLang

int

$aCfgClient

Get Level of a given idcat. If idcat wasn't loaded yet, level will be queried.

getLevel(int $iIdcat) : int

access public

Parameters

$iIdcat

int

Returns

intLevel of requested idcat. In case of an error, -1 is returned.

getRootCat()

getRootCat() 

Load and return Subcategories of a given Category.

getSubCategories(int $iIdcat, boolean $bAsObjects, boolean $bWithSubCategories, int $iSubCategoriesLoadDepth) : mixed

If you need Categories by FrontendPermission, you need to call method setAuth() before (!) calling loadSubCategories(). loadSubCategories() then automatically checks against FrontendPermission.

access public
author Rudi Bieller

Parameters

$iIdcat

int

$bAsObjects

boolean

If set to true, will load Subcategories as objects, otherwise as Array.

$bWithSubCategories

boolean

Set to true to also load subcategories of loaded SubCategories

$iSubCategoriesLoadDepth

int

Up to shich level should SubCategories be loaded. Defaults to 3 for a 3-level Navigation.

Returns

mixedContenido_Categories or Array, depending on value for $bAsObjects

Get a URL to a Navigation point.

getUrl(array $aParams, string $sStyle, array $aConfig, boolean $bUseAbsolutePath) : void
Inherited

Depending on style of URL needed, values of $aParams differ.

access public
see \appropriate
inherited_from \Contenido_FrontendNavigation_Base::getUrl()

Parameters

$aParams

array

Parameters needed to build the URL

$sStyle

string

Available styles are: front_content, custom, custom_path

$aConfig

array

As default this is Contenido_UrlBuilderConfig::getConfig(), can be overridden by setting this value

$bUseAbsolutePath

boolean

If true, will use absolute http://www.xy.com/ as "prefix"

Exceptions

\InvalidArgumentException

Check if current idcat is an active child category of a given Contenido_Category

isActiveChild(Contenido_Category $oCategory, int $iCurrentIdcat) : boolean

access public
author Rudi Bieller

Parameters

$oCategory

\Contenido_Category

$iCurrentIdcat

int

Returns

boolean

Check if current idcat is an active parent category of a given Contenido_Category

isActiveParent(Contenido_Category $oCategory, int $iCurrentIdcat) : boolean

access public
author Rudi Bieller

Parameters

$oCategory

\Contenido_Category

$iCurrentIdcat

int

Returns

boolean

Checks if needle cat is in breadcrumb of haystack up to top level.

isInPathToRoot(int $iNeedleCat, int $iTreeHaystackCat) : boolean

access public

Parameters

$iNeedleCat

int

$iTreeHaystackCat

int

Returns

boolean

Set internal property for Auth object to load only those categories the FE-User has right to see.

setAuth(Auth $oAuth) : void

Use this method if you have protected Categories and need to check agains FrontendUser Rights.

access public
author Rudi Bieller

Parameters

$oAuth

\Auth

Set internal property for debugging on/off and choose appropriate debug object

setDebug(boolean $bDebug, string $sDebugMode) : void
Inherited

access public
author Rudi Bieller
inherited_from \Contenido_FrontendNavigation_Base::setDebug()

Parameters

$bDebug

boolean

$sDebugMode

string

setRootCat()

setRootCat($iIdcat) 

Parameters

$iIdcat

Load Subcategories of a given Category-ID.

loadSubCategories(int $iIdcat, boolean $bAsObjects, boolean $bWithSubCategories, int $iSubCategoriesLoadDepth) : boolean

If you need Categories by FrontendPermission, you need to call method setAuth() before (!) calling loadSubCategories(). loadSubCategories() then automatically checks against FrontendPermission.

access protected
author Rudi Bieller

Parameters

$iIdcat

int

$bAsObjects

boolean

If set to true, will load Subcategories as objects, otherwise as Array.

$bWithSubCategories

boolean

Set to true to also load subcategories of loaded SubCategories

$iSubCategoriesLoadDepth

int

Up to shich level should SubCategories be loaded. Defaults to 3 for a 3-level Navigation.

Returns

boolean

 Properties

 

$aCategories

$aCategories : array
Inherited

access protected
inherited_from \Contenido_FrontendNavigation_Base::$$aCategories
 

$aCfg

$aCfg : array
Inherited

access protected
inherited_from \Contenido_FrontendNavigation_Base::$$aCfg
 

$aCfgClient

$aCfgClient : array
Inherited

access protected
inherited_from \Contenido_FrontendNavigation_Base::$$aCfgClient
 

$aLevel

$aLevel : array

access protected
 

$bDbg

$bDbg : boolean
Inherited

access protected
inherited_from \Contenido_FrontendNavigation_Base::$$bDbg
 

$iClient

$iClient 
Inherited

inherited_from \Contenido_FrontendNavigation_Base::$$iClient
 

$iLang

$iLang 
Inherited

inherited_from \Contenido_FrontendNavigation_Base::$$iLang
 

$iRootCat

$iRootCat : int

access protected
 

$oAuth

$oAuth : \obj

access protected
 

$oCategories

$oCategories : \obj
Inherited

access protected
inherited_from \Contenido_FrontendNavigation_Base::$$oCategories
 

$oDb

$oDb : \obj
Inherited

access protected
inherited_from \Contenido_FrontendNavigation_Base::$$oDb
 

$oDbg

$oDbg : \obj
Inherited

access protected
inherited_from \Contenido_FrontendNavigation_Base::$$oDbg
 

$sDbgMode

$sDbgMode : string
Inherited

access protected
inherited_from \Contenido_FrontendNavigation_Base::$$sDbgMode