Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • PHP
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SIWECOS
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • FrontendNavigation
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class FrontendNavigation

file FrontendNavigation.php

Package: Plugin\Repository\FrontendNavigation
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Willi Man
Located at plugins/repository/custom/FrontendNavigation.php
Methods summary
public
# __construct( )

FrontendNavigation constructor

FrontendNavigation constructor

public FrontendNavigation
# FrontendNavigation( )

Old constructor

Old constructor

Deprecated

[2016-02-11] This method is deprecated and is not needed any longer. Please use __construct() as constructor function.

Returns

FrontendNavigation
public array
# getSubCategories( integer $parentCategory )

Get child categories by given parent category

Get child categories by given parent category

Parameters

$parentCategory
integer
$parentCategory

Returns

array

Throws

cDbException
public boolean
# hasChildren( integer $parentCategory )

Check if child categories of a given parent category exist

Check if child categories of a given parent category exist

Parameters

$parentCategory
integer
$parentCategory

Returns

boolean

Throws

cDbException
public integer
# getSuccessor( integer $category )

Get direct successor of a given category Note: does not work if direct successor (with preid 0) is not visible or not public

Get direct successor of a given category Note: does not work if direct successor (with preid 0) is not visible or not public

Parameters

$category
integer
$category

Returns

integer

Throws

cDbException
public boolean
# hasSuccessor( integer $category )

Check if a given category has a direct successor

Check if a given category has a direct successor

Parameters

$category
integer
$category

Returns

boolean

Throws

cDbException
public string
# getCategoryName( integer $cat_id )

Get category name

Get category name

Parameters

$cat_id
integer
$cat_id

Returns

string

Throws

cDbException
public string
# getCategoryURLName( integer $cat_id )

Get category urlname

Get category urlname

Parameters

$cat_id
integer
$cat_id

Returns

string

Throws

cDbException
public boolean
# isVisible( integer $cat_id )

Check if category is visible

Check if category is visible

Parameters

$cat_id
integer
$cat_id

Returns

boolean

Throws

cDbException
public boolean
# isPublic( integer $cat_id )

Check if category is public

Check if category is public

Parameters

$cat_id
integer
$cat_id

Returns

boolean

Throws

cDbException
public boolean
# isParent( integer $parentid, integer $catid )

Return true if $parentid is parent of $catid

Return true if $parentid is parent of $catid

Parameters

$parentid
integer
$parentid
$catid
integer
$catid

Returns

boolean

Throws

cDbException
public integer
# getParent( integer $preid )

Get parent id of a category

Get parent id of a category

Parameters

$preid
integer
$preid

Returns

integer

Throws

cDbException
public boolean
# hasParent( integer $preid )

Check if a category has a parent

Check if a category has a parent

Parameters

$preid
integer
$preid

Returns

boolean

Throws

cDbException
public integer
# getLevel( integer $catid )

Get level of a category

Get level of a category

Parameters

$catid
integer
$catid

Returns

integer

Throws

cDbException
public string
# getFrontContentUrl( integer $idcat, integer $idart, boolean $absolute = true )

Get URL by given category in front_content.php style

Get URL by given category in front_content.php style

Parameters

$idcat
integer
$idcat
$idart
integer
$idart
$absolute
boolean
$absolute return absolute path or not [optional]

Returns

string
$url
public string
# getUrlPath( integer $idcat, integer $idart, boolean $absolute = true, integer $level = 0, string $urlSuffix = 'index.html' )

Get urlpath by given category and/or idart and level. The urlpath looks like /Home/Product/Support/ where the directory-like string equals a category path.

Get urlpath by given category and/or idart and level. The urlpath looks like /Home/Product/Support/ where the directory-like string equals a category path.

Parameters

$idcat
integer
$idcat
$idart
integer
$idart
$absolute
boolean
$absolute return absolute path or not [optional]
$level
integer
$level [optional]
$urlSuffix
string
$urlSuffix [optional]

Returns

string
path information or empty string

Requires

functions.pathresolver.php
public string
# getUrlPathGenParam( integer $idcat, integer $selectedNumber, boolean $absolute = true, integer $level = 0 )

Get urlpath by given category and/or selected param and level.

Get urlpath by given category and/or selected param and level.

Parameters

$idcat
integer
$idcat
$selectedNumber
integer
$selectedNumber
$absolute
boolean
$absolute return absolute path or not [optional]
$level
integer
$level [optional]

Returns

string
path information or empty string

Requires

functions.pathresolver.php
public string
# getURL( integer $idcat, integer $idart, string $type = '', boolean $absolute = true, integer $level = 0 )

Get URL by given categoryid and/or articleid

Get URL by given categoryid and/or articleid

Parameters

$idcat
integer
$idcat url name to create for
$idart
integer
$idart
$type
string
$type
$absolute
boolean
$absolute return absolute path or not [optional]
$level
integer
$level

Returns

string
$url or empty
public integer
# getCategoryOfArticle( integer $idart )

Get category of article.

Get category of article.

If an article is assigned to more than one category take the first category.

Parameters

$idart
integer
$idart

Returns

integer
category id or negative integer

Throws

cDbException
public array
# getCategoryPath( integer $cat_id, integer $level = 0, boolean $reverse = true )

Get path of a given category up to a certain level

Get path of a given category up to a certain level

Parameters

$cat_id
integer
$cat_id
$level
integer
$level [optional]
$reverse
boolean
$reverse

Returns

array

Throws

cDbException
public array
# getRoot( integer $cat_id )

Get root category of a given category

Get root category of a given category

Parameters

$cat_id
integer
$cat_id

Returns

array

Throws

cDbException
public array
# getSubTree( integer $idcat_start )

get subtree by a given id

get subtree by a given id

Parameters

$idcat_start
integer
$idcat_start Id of category

Returns

array
Array with subtree

Throws

cDbException
Properties summary
protected cDb $_db null
#

References database object

References database object

protected boolean $_debug false
#
protected integer $_client 0
#
protected array $_cfgClient array()
#
protected array $_cfg array()
#
protected integer $_lang 0
#
CMS CONTENIDO 4.10.1 API documentation generated by ApiGen 2.8.0