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 HtmlDiv

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

Create html div elements

This class creates html div elements. Create an instance of an div element and nest the inline elements. The class supports nesting of several div elements and allows you to configure all attributes programatically. The parsed div object with inline elements is returned as string.


Class: HtmlDiv
Code:

$testArray = array('Test_1', 'Test_2','Test_3'); // Get the Instance for a new division element $div = new HtmlDiv('ID_Wrapper', 'Class_Wrapper'); // add a headline $div->addInline('h1', '', '', 'Headline'); // add a paragraph $div->addInline('p', 'ID_P', 'CLASS_TEXT', 'This is a demo of a pargraph element in the division block'); // add a paragraph $div->addInline('p', '', 'CLASS_TEXT_ARRAY', $testArray); // very often you need to nest several div elements for styling, etc. // so just add a next div, or further divs $div->addDivElement('ID_PAGE', 'DIV_2'); // now the inline element or elements $div->addInline('p', '', '', 'This is a demo of a pargraph element in a nested division block'); // Example nesting more div elements. $div->addDivElement('ID_SECOND_LEVEL', 'DIV'); $div->addDivElement('ID_THIRD_LEVEL', 'DIV'); $div->addDivElement('ID_FOURTH_LEVEL', 'DIV'); // now the inline element in fourth div element $div->addInline('p', '', '', 'This is a demo of a pargraph element nested in the fourth level'); // If you want to close a div in the current level,... $div->closeParentElement('div'); // now the current div is closed and the current level jumps to the third div element // here we can go on adding the inline elments $div->addInline('p', '', 'P_IN_3RD-DIVLEVEL', $testArray); // get the parsed block element -> all opened divs are closed automatically ! echo $div->getHtmlDiv();


Endcode
Par: Example: Creating a div element
Located at htmldiv.php

Methods summary

public
# __construct( string $id = null, string $class = null )

Constructor creates the element

Constructor creates the element

Parameters

$id
Id of the main div
$class
Class name of the main div

Overrides

HtmlElement::__construct
public
# addDivElement( string $id = null, string $class = null )

Add a datalist (dl).

Add a datalist (dl).

Parameters

$id
Id Attribute
$class
Class Attribute
public
# addInline( string $element, string $id = null, string $class = null, string $data = null )

Add inline element into current division.

Add inline element into current division.

Parameters

$element
The inline element
$id
Id Attribute
$class
Class Attribute
$data
Data of the element (optional)
public boolean
# closeParentElement( string $parentElement )

This method sets the endtag of the selected element and removes the entry from log array. If nesting mode is not used, the methods looks for the entry in the array and determines that all setted elements after the selected element must be closed as well. All end tags to position are closed automatically starting with last setted element tag.

This method sets the endtag of the selected element and removes the entry from log array. If nesting mode is not used, the methods looks for the entry in the array and determines that all setted elements after the selected element must be closed as well. All end tags to position are closed automatically starting with last setted element tag.

Parameters

$parentElement
Parent element to be closed

Returns

boolean

Overrides

HtmlElement::closeParentElement
public string
# getHtmlDiv( )

Get the parsed html division (div)

Get the parsed html division (div)

Returns

string
Returns the validated html div as string

Methods inherited from HtmlElement

addAttribute(), addData(), addElement(), addHtml(), addParentElement(), getHtmlElement(), setAttributesFromArray()

Properties summary

protected $level
#

Properties inherited from HtmlElement

$arrParentElements, $currentElement, $currentElementAttributes, $currentElementDataWritten, $htmlString, $mainElement, $mainElementAttributes, $mainElementWritten, $nesting, $parentFlag

Admidio API API documentation generated by ApiGen