Admidio API
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Packages

  • com
    • tecnick
      • tcpdf
  • None
  • PHPMailer
    • easypeasyics
  • PHPWavUtils
  • Securimage
    • classes

Classes

  • AutoLogin
  • Component
  • ComponentUpdate
  • ConditionParser
  • Database
  • DateTimeExtended
  • Email
  • Folder
  • FormValidation
  • FunctionClass
  • Htaccess
  • HtmlDiv
  • HtmlElement
  • HtmlForm
  • HtmlFormBasic
  • HtmlFormInstallation
  • HtmlList
  • HtmlNavbar
  • HtmlPage
  • HtmlTable
  • HtmlTableBasic
  • Image
  • Inventory
  • InventoryFields
  • Language
  • LanguageData
  • ListConfiguration
  • Menu
  • Message
  • ModuleAnnouncements
  • ModuleDates
  • ModuleLists
  • ModuleMenu
  • ModuleMessages
  • Modules
  • ModuleWeblinks
  • MyFiles
  • Navigation
  • ntlm_sasl_client_class
  • Organization
  • Participants
  • PasswordHash
  • PasswordHashing
  • ProfileFields
  • RoleDependency
  • RolesRights
  • RSSfeed
  • Session
  • SystemMail
  • TableAccess
  • TableAnnouncement
  • TableCategory
  • TableDate
  • TableFile
  • TableFolder
  • TableGuestbook
  • TableGuestbookComment
  • TableInventory
  • TableInventoryField
  • TableLists
  • TableMembers
  • TableMessage
  • TablePhotos
  • TableRoles
  • TableRooms
  • TableText
  • TableUserField
  • TableUsers
  • TableWeblink
  • UploadHandlerDownload
  • UploadHandlerPhoto
  • User
  • UserRegistration

Exceptions

  • AdmException
  • WavFileException
  • WavFormatException

Functions

  • admFuncAutoload
  • admFuncGeneratePagination
  • admFuncGetBytesFromSize
  • admFuncGetDirectoryEntries
  • admFuncMaxUploadSize
  • admFuncProcessableImageSize
  • admFuncShowCreateChangeInfoById
  • admFuncShowCreateChangeInfoByName
  • admFuncVariableIsValid
  • admReadTemplateFile
  • admStrIsValidFileName
  • admStrStripTagsSpecial
  • admStrToLower
  • admStrToUpper
  • bzip2Version
  • checkDatabaseVersion
  • checkPhpVersion
  • EmailAttachment
  • FileSizeNiceDisplay
  • FormattedTimeRemaining
  • FunctionIsDisabled
  • getFormerRolesFromDatabase
  • getFutureRolesFromDatabase
  • getmicrotime
  • getRoleMemberships
  • getRolesFromDatabase
  • gzipVersion
  • hasRole
  • hl_attrval
  • hl_bal
  • hl_cmtcd
  • hl_ent
  • hl_prot
  • hl_regex
  • hl_spec
  • hl_tag
  • hl_tag2
  • hl_tidy
  • hl_version
  • htmLawed
  • HTMLFilter
  • isGroupLeader
  • isMember
  • kses
  • kses_hook
  • MySQLdumpVersion
  • OutputInformation
  • SafeExec
  • showNotice
  • strAddSlashesDeep
  • strNextLetter
  • strStripSlashesDeep
  • strStripTags
  • strValidCharacters
  • tln_body2div
  • tln_casenormalize
  • tln_deent
  • tln_defang
  • tln_findnxreg
  • tln_findnxstr
  • tln_fixatts
  • tln_fixstyle
  • tln_fixurl
  • tln_getnxtag
  • tln_sanitize
  • tln_skipspace
  • tln_tagprint
  • tln_unspace
  • version_compare_replacement
  • version_compare_replacement_sub

Class Navigation

Copyright: 2004-2016 The Admidio Team
License: GNU General Public License v2.0 only **********************************************************************************************
Brief:

Handle the navigation within a module and could create a html navigation bar

This class stores every url that you add to the object in a stack. From there it's possible to return the last called url or a previous url. This can be used to allow a navigation within a module. It's also possible to create a html navigation bar. Therefore you should add a url and a link text to the object everytime you submit a url.


Class: Navigation
Code:

// start the navigation in a module (the object $gNavigation is created in common.php) $gNavigation->addStartUrl('http://www.example.com/index.php', 'Example-Module');

// add a new url from another page within the same module $gNavigation->addUrl('http://www.example.com/addentry.php', 'Add Entry');

// optional you can now create the html navigation bar $gNavigation->getHtml();

// if you want to remove the last entry from the stack $gNavigation->deleteLastUrl(); @endcode


Code:

// show a navigation bar in your html code ...
getHtmlNavigationBar('id-my-navigation'); ?>
... @endcode


Par: Example 1
Par: Example 2
Located at navigation.php

Methods summary

public
# __construct( )

Constructor will initialize the local parameters

Constructor will initialize the local parameters

public
# addStartUrl( string $url, string $text = null, string $icon = null )

Initialize the stack and adds a new url to the navigation stack. If a html navigation bar should be created later than you should fill the text and maybe the icon.

Initialize the stack and adds a new url to the navigation stack. If a html navigation bar should be created later than you should fill the text and maybe the icon.

Parameters

$url
The url that should be added to the navigation stack.
$text

A text that should be shown in the html navigation stack and would be linked with the $url.

$icon

A url to the icon that should be shown in the html navigation stack together with the text and would be linked with the $url.

public boolean
# addUrl( string $url, string $text = null, string $icon = null )

Add a new url to the navigation stack. If a html navigation bar should be created later than you should fill the text and maybe the icon. Before the url will be added to the stack the method checks if the current url was already added to the url.

Add a new url to the navigation stack. If a html navigation bar should be created later than you should fill the text and maybe the icon. Before the url will be added to the stack the method checks if the current url was already added to the url.

Parameters

$url
The url that should be added to the navigation stack.
$text

A text that should be shown in the html navigation stack and would be linked with the $url.

$icon

A url to the icon that should be shown in the html navigation stack together with the text and would be linked with the $url.

Returns

boolean
Returns true if the url got added and false if not.
public
# clear( )

Initialize the url stack and set the internal counter to 0

Initialize the url stack and set the internal counter to 0

public integer
# count( )

Number of urls that a currently in the stack

Number of urls that a currently in the stack

Returns

integer
public string[]
# deleteLastUrl( )

Removes the last url from the stack.

Removes the last url from the stack.

Returns

string[]
Returns the removed element
public string
# getHtmlBackButton( string $id = 'adm-navigation-back' )

Returns html code that contain a link back to the previous url.

Returns html code that contain a link back to the previous url.

Parameters

$id
Optional you could set an id for the back link

Returns

string
Returns html code of the navigation back link.
public string
# getHtmlNavigationBar( string $id = 'adm-navigation-bar' )

Returns html code that contain links to all previous added urls from the stack. The output will look like: @n FirstPage > SecondPage > ThirdPage ...@n The last page of this list is always the current page.

Returns html code that contain links to all previous added urls from the stack. The output will look like: @n FirstPage > SecondPage > ThirdPage ...@n The last page of this list is always the current page.

Parameters

$id
Optional you could set an id for the navigation bar

Returns

string
Returns html code of the navigation bar.
public string|null
# getPreviousUrl( )

Get the previous url from the stack. This is not the last url that was added to the stack!

Get the previous url from the stack. This is not the last url that was added to the stack!

Returns

string|null
Returns the previous added url. If only one url is added it returns this one. If no url is added returns null
public string|null
# getUrl( )

Get the last added url from the stack.

Get the last added url from the stack.

Returns

string|null
Returns the last added url. If the stack is empty returns null

Properties summary

private $urlStack
#
Admidio API API documentation generated by ApiGen