PHP Class Gc\Component\Navigation

Afficher le fichier Open project: gotcms/gotcms Class Usage Examples

Protected Properties

Свойство Type Description
$basePath string Base path for urls
$documents array List of \Gc\Document\Model
$requestUri string Request uri
$useActiveBranch boolean Use active branch

Méthodes publiques

Méthode Description
__construct ( integer $documentId, boolean $activeBranch = false ) Constructor, initialize documents
getBasePath ( ) : string Get base Path
render ( array $documents = null, string $parentUrl = null ) : array Render navigation
setBasePath ( string $path ) : Navigation Set base path for urls
useActiveBranch ( boolean $boolean = null ) : mixte Constructor, initialize documents

Méthodes protégées

Méthode Description
checkDocuments ( mixed $documents ) : array Check documents
hasActiveChildren ( array $pages ) : boolean Check if page has active children
renderChildren ( Model $document, string $parentUrl, &$data ) : void Render children

Method Details

__construct() public méthode

Constructor, initialize documents
public __construct ( integer $documentId, boolean $activeBranch = false )
$documentId integer Document id
$activeBranch boolean Use active branch or not

checkDocuments() protected méthode

Check documents
protected checkDocuments ( mixed $documents ) : array
$documents mixed List of Document\Model
Résultat array

getBasePath() public méthode

Get base Path
public getBasePath ( ) : string
Résultat string

hasActiveChildren() protected méthode

Check if page has active children
protected hasActiveChildren ( array $pages ) : boolean
$pages array List of pages as array
Résultat boolean

render() public méthode

Render navigation
public render ( array $documents = null, string $parentUrl = null ) : array
$documents array Let of \Gc\Document\Model
$parentUrl string Parent url
Résultat array

renderChildren() protected méthode

Render children
protected renderChildren ( Model $document, string $parentUrl, &$data ) : void
$document Gc\Document\Model Document model
$parentUrl string Parent url
Résultat void

setBasePath() public méthode

Set base path for urls
public setBasePath ( string $path ) : Navigation
$path string Path
Résultat Navigation

useActiveBranch() public méthode

Constructor, initialize documents
public useActiveBranch ( boolean $boolean = null ) : mixte
$boolean boolean Set the branch is active or only one page
Résultat mixte

Property Details

$basePath protected_oe property

Base path for urls
protected string $basePath
Résultat string

$documents protected_oe property

List of \Gc\Document\Model
protected array $documents
Résultat array

$requestUri protected_oe property

Request uri
protected string $requestUri
Résultat string

$useActiveBranch protected_oe property

Use active branch
protected bool $useActiveBranch
Résultat boolean