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 HtmlNavbar

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

Class manages display of navbar in modules

This class manage the presentation of a module menu. You can add as many items to the menu and the class tries to display them in the perfect way for the module. If there are to many items to display all than it will create a menu button where you can find all the other menu items. The position of the items is important. Only the first items will display permanently in the module. The other items are summarized in a submenu.


Class: HtmlNavbar
Code:

// create module menu $myNavbar = new HtmlNavbar('menu_my_module', 'My module');

// show link to create new announcement $myNavbar->addItem('menu_item_new_entry', $g_root_path.'/adm_program/modules/mymodule/mymodule_new.php', $gL10n->get('SYS_CREATE'), 'add.png'); $myNavbar->show(); @endcode


Par: Examples
Located at htmlnavbar.php

Methods summary

public
# __construct( string $id, string $name = null, HtmlPage $htmlPage = null, string $type = 'default' )

creates the object of the module menu and initialize all class parameters

creates the object of the module menu and initialize all class parameters

Parameters

$id
Html id of the navbar
$name
Name of the navbar that will be shown when navbar changed to vertical mode on small devices
$htmlPage

Optional a HtmlPage object that will be used to add javascript code or files to the html output page.

$type

Different types of the navbar can be defined. default: will be the standard navbar of all modules. filter: should be used if this navbar is used to filter data of within the script.

protected string
# createHtmlLink( array $data )

Creates the html for the menu entry.

Creates the html for the menu entry.

Parameters

$data
An array with all data if the item. This will be @id, @url, @text and @icon.

Returns

string
Returns the html for the menu entry
public
# addCssClass( string $className )

This method adds an additional css class to the main nav tag of the menu.

This method adds an additional css class to the main nav tag of the menu.

Parameters

$className
The name of a css class that should be add to the main nav tag of the manu
public
# addForm( string $htmlForm )

Add a form to the menu. The form will be added between the left and the right part of the navbar.

Add a form to the menu. The form will be added between the left and the right part of the navbar.

Parameters

$htmlForm
A html code of a form that will be added to the menu
public
# addItem( string $id, string $url, string $text, string $icon, string $orientation = 'left', string $parentItem = 'navbar', string $class = '' )

Add a new item to the menu. This can be added to the left or right part of the navbar. You can also add another item to an existing dropdown item. Therefore use the @b $parentItem parameter.

Add a new item to the menu. This can be added to the left or right part of the navbar. You can also add another item to an existing dropdown item. Therefore use the @b $parentItem parameter.

Parameters

$id
Html id of the item.
$url
The url of the generated link of this item.
$text
The text of the item and the generated link.
$icon
Icon of the menu item, that will also be linked
$orientation
The item can be shown at the @b left or @b right part of the navbar.
$parentItem

All items should be added to the @b navbar as parent. But if you have already added a dropdown than you can add the item to that dropdown. Just commit the id of that item.

$class
Optional a css class that will be set for the item.
public
# setName( string $name )

Set the name of the navbar that will be shown when navbar changed to vertical mode on small devices.

Set the name of the navbar that will be shown when navbar changed to vertical mode on small devices.

Parameters

$name
New name of the navbar.
private string
# getNavHtml( array[] $items, string $class = '' )

Parameters

$items
$class

Returns

string
public string
# show( )

Creates the html output of the module menu. Each added menu item will be displayed. If one item has several subitems than a dropdown button will be created.

Creates the html output of the module menu. Each added menu item will be displayed. If one item has several subitems than a dropdown button will be created.

Returns

string
Returns the html output for the complete menu

Properties summary

protected $leftItems
#
protected $rightItems
#
protected $htmlPage
#
protected $htmlForm
#
protected $name
#
protected $type
#
protected $id
#
protected $customCssClass
#
Admidio API API documentation generated by ApiGen