phpMv  -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
HtmlDropdown Class Reference
+ Inheritance diagram for HtmlDropdown:
+ Collaboration diagram for HtmlDropdown:

Public Member Functions

 __construct ($identifier, $value="", $items=array(), $associative=true)
 
 getField ()
 
 getDataField ()
 
 addItem ($item, $value=NULL, $image=NULL, $description=NULL)
 
 addIcon ($icon, $before=true, $labeled=false)
 
 addIcons ($icons)
 
 insertItem ($item, $position=0)
 Insert an item at a position. More...
 
 fromDatabaseObject ($object, $function)
 
 addInput ($name)
 
 addSearchInputItem ($placeHolder=NULL, $icon=NULL)
 Adds a search input item. More...
 
 addDividerItem ()
 Adds a divider item. More...
 
 addHeaderItem ($caption=NULL, $icon=NULL)
 Adds an header item. More...
 
 addCircularLabelItem ($caption, $color)
 Adds an item with a circular label. More...
 
 addMiniAvatarImageItem ($caption, $image)
 
 addItems ($items)
 
 setPropertyValues ($property, $values)
 Sets the values of a property for each item in the collection. More...
 
 each ($callBack)
 
 getItem ($index)
 
 count ()
 
 asDropdown ($dropdown)
 
 setVertical ()
 
 setInline ()
 
 setSimple ()
 
 asButton ($floating=false)
 
 asSelect ($name=NULL, $multiple=false, $selection=true)
 
 asSearch ($name=NULL, $multiple=false, $selection=true)
 
 setSelect ($name=NULL, $multiple=false)
 
 asSubmenu ($pointing=NULL)
 
 setPointing ($value=Direction::NONE)
 
 setValue ($value)
 
 setDefaultText ($text)
 
 run (JsUtils $js)
 
 setCompact ()
 
 setAction ($action)
 
 setOn ($on)
 
 setShowOnFocus ($value)
 
 setAllowAdditions ($value)
 
 setFullTextSearch ($value)
 
 compile (JsUtils $js=NULL, &$view=NULL)
 
 getInput ()
 
 setIcon ($icon="dropdown")
 
 jsAddItem ($caption, $value=null)
 
 setClearable ($value)
 
 setOnAdd ($jsCode)
 Is called after a dropdown selection is added using a multiple select dropdown, only receives the added value Parameters addedValue, addedText, $addedChoice. More...
 
 setOnRemove ($jsCode)
 Is called after a dropdown selection is removed using a multiple select dropdown, only receives the removed value Parameters removedValue, removedText, $removedChoice. More...
 
- Public Member Functions inherited from HtmlSemDoubleElement
 __construct ($identifier, $tagName="p", $baseClass="ui", $content=NULL)
 
 setPopupAttributes ($variation=NULL, $popupEvent=NULL)
 Defines the popup attributes. More...
 
 addPopup ($title="", $content="", $variation=NULL, $params=array())
 Adds a popup to the element. More...
 
 addPopupHtml ($html="", $variation=NULL, $params=array())
 Adds an html popup to the element. More...
 
 addDimmer ($params=array(), $content=NULL)
 Adds a Dimmer to the element. More...
 
 addLabel ($label, $before=false, $icon=NULL)
 Adds a label to the element. More...
 
 attachLabel ($label, $side=Side::TOP, $direction=Direction::NONE, $icon=NULL)
 Adds an attached label to the element. More...
 
 asLink ($href=NULL, $target=NULL)
 Transforms the element into a link. More...
 
 jsShowDimmer ($show=true)
 Returns the script displaying the dimmer. More...
 
 compile (JsUtils $js=NULL, &$view=NULL)
 {} More...
 
 run (JsUtils $js)
 {} More...
 
 addList ($items, $ordered=false)
 
 asToast ($params=NULL)
 
 asSideBar ($classes='')
 
- Public Member Functions inherited from HtmlDoubleElement
 __construct ($identifier, $tagName="p")
 
 setContent ($content)
 
 getContent ()
 
 addContent ($content, $before=false)
 
 run (JsUtils $js)
 
 setValue ($value)
 
 wrapContent ($before, $after="")
 
 wrapWith (HtmlDoubleElement $container)
 Wraps the element with a container. More...
 
 getContentInstances ($class)
 
 asLink ($href=NULL, $target=NULL)
 Transforms the element into a link. More...
 
 getTextContent ()
 
 asEditable (HtmlFormField $field, $asForm=false, $setValueProperty="val()")
 
- Public Member Functions inherited from HtmlSingleElement
 __construct ($identifier, $tagName="br")
 
 setClass ($classNames)
 
 addClass ($classNames)
 
 setRole ($value)
 
 setTitle ($value)
 
 setStyle ($value)
 
 run (JsUtils $js)
 
 fromArray ($array)
 
 setSize ($size)
 
- Public Member Functions inherited from BaseHtml
 run (JsUtils $js)
 
 getTagName ()
 
 setTagName ($tagName)
 
 fromArray ($array)
 
 fromDatabaseObjects ($objects, $function)
 
 fromDatabaseObject ($object, $function)
 
 wrap ($before, $after="")
 
 getElementById ($identifier, $elements)
 
 getBsComponent ()
 
 setBsComponent ($bsComponent)
 
 compile (JsUtils $js=NULL, &$view=NULL)
 
 setDraggable ($attr="id", $dropZone=null, $parameters=[])
 Sets the element draggable, and eventualy defines the dropzone (HTML5 drag and drop) More...
 
 asDropZone ($jsCallback="", $jqueryDone="append", $parameters=[])
 Declares the element as a drop zone (HTML5 drag and drop) More...
 
 asFileDropZone ($responseElement=null, $url=null, $progress=null, $jsCallback="", $parameters=[])
 Declares the element as a drop zone for file uploading (HTML5 drag and drop) More...
 
 __toString ()
 
 onPostCompile ($callback)
 
 onPreCompile ($callback)
 
- Public Member Functions inherited from BaseWidget
 __construct ($identifier)
 
 getIdentifier ()
 
 setIdentifier ($identifier)
 
 getLibraryId ()
 
 setLibraryId ($_libraryId)
 

Protected Member Functions

 removeArrow ()
 
 beforeAddItem ($item, $value=NULL, $image=NULL, $description=NULL)
 
- Protected Member Functions inherited from HtmlDoubleElement
 _getContentInstances ($class, $content)
 
 compile_once (\Ajax\JsUtils $js=NULL, &$view=NULL)
 {} More...
 
- Protected Member Functions inherited from BaseHtml
 getTemplate (JsUtils $js=NULL, $view=null)
 
 ctrl ($name, $value, $typeCtrl)
 
 setMemberCtrl (&$name, $value, $typeCtrl)
 
 addToMemberUnique (&$name, $value, $typeCtrl, $separator=" ")
 
 addToMemberCtrl (&$name, $value, $typeCtrl, $separator=" ")
 
 addToMember (&$name, $value, $separator=' ')
 
 removeOldValues (&$oldValue, $allValues)
 
 _getElementBy ($callback, $elements)
 
 setWrapBefore ($wrapBefore)
 
 setWrapAfter ($wrapAfter)
 
 compile_once (JsUtils $js=NULL, &$view=NULL)
 
- Protected Member Functions inherited from BaseWidget
 cleanIdentifier ($id)
 

Protected Attributes

 $mClass = "menu"
 
 $mTagName = "div"
 
 $items = array()
 
 $_params
 
 $input
 
 $value
 
 $_associative
 
 $_multiple
 
- Protected Attributes inherited from HtmlSemDoubleElement
 $_popup = NULL
 
 $_dimmer = NULL
 
 $_toast = NULL
 
 $_sidebar = NULL
 
 $_params = array()
 
- Protected Attributes inherited from HtmlDoubleElement
 $content
 
 $wrapContentBefore = ""
 
 $wrapContentAfter = ""
 
 $_editableContent
 
- Protected Attributes inherited from BaseHtml
 $_template
 
 $tagName
 
 $_wrapBefore = array()
 
 $_wrapAfter = array()
 
 $_bsComponent
 
 $_compiled = false
 
 $_runned = false
 
 $_postCompile
 
 $_preCompile
 
- Protected Attributes inherited from BaseWidget
 $identifier
 
 $_identifier
 
 $_libraryId
 
 $_self
 

Private Member Functions

 applyValue ()
 

Detailed Description

Definition at line 15 of file HtmlDropdown.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $identifier,
  $value = "",
  $items = array(),
  $associative = true 
)

Definition at line 40 of file HtmlDropdown.php.

Member Function Documentation

◆ addCircularLabelItem()

addCircularLabelItem (   $caption,
  $color 
)

Adds an item with a circular label.

Parameters
string$caption
string$color
Returns
HtmlDropdownItem

Definition at line 191 of file HtmlDropdown.php.

◆ addDividerItem()

addDividerItem ( )

Adds a divider item.

Returns
HtmlDropdownItem

Definition at line 169 of file HtmlDropdown.php.

◆ addHeaderItem()

addHeaderItem (   $caption = NULL,
  $icon = NULL 
)

Adds an header item.

Parameters
string$caption
string$icon
Returns
HtmlDropdownItem

Definition at line 180 of file HtmlDropdown.php.

◆ addIcon()

addIcon (   $icon,
  $before = true,
  $labeled = false 
)

Definition at line 80 of file HtmlDropdown.php.

◆ addIcons()

addIcons (   $icons)

Definition at line 90 of file HtmlDropdown.php.

◆ addInput()

addInput (   $name)

Definition at line 144 of file HtmlDropdown.php.

◆ addItem()

addItem (   $item,
  $value = NULL,
  $image = NULL,
  $description = NULL 
)

Definition at line 74 of file HtmlDropdown.php.

◆ addItems()

addItems (   $items)

Definition at line 205 of file HtmlDropdown.php.

◆ addMiniAvatarImageItem()

addMiniAvatarImageItem (   $caption,
  $image 
)
Parameters
string$caption
string$image
Returns

Definition at line 201 of file HtmlDropdown.php.

◆ addSearchInputItem()

addSearchInputItem (   $placeHolder = NULL,
  $icon = NULL 
)

Adds a search input item.

Parameters
string$placeHolder
string$icon
Returns
HtmlDropdownItem

Definition at line 160 of file HtmlDropdown.php.

◆ applyValue()

applyValue ( )
private

Definition at line 365 of file HtmlDropdown.php.

◆ asButton()

asButton (   $floating = false)

Definition at line 295 of file HtmlDropdown.php.

◆ asDropdown()

asDropdown (   $dropdown)
Parameters
boolean$dropdown

Definition at line 263 of file HtmlDropdown.php.

◆ asSearch()

asSearch (   $name = NULL,
  $multiple = false,
  $selection = true 
)

Definition at line 319 of file HtmlDropdown.php.

◆ asSelect()

asSelect (   $name = NULL,
  $multiple = false,
  $selection = true 
)

Definition at line 303 of file HtmlDropdown.php.

◆ asSubmenu()

asSubmenu (   $pointing = NULL)

Definition at line 343 of file HtmlDropdown.php.

◆ beforeAddItem()

beforeAddItem (   $item,
  $value = NULL,
  $image = NULL,
  $description = NULL 
)
protected

Definition at line 120 of file HtmlDropdown.php.

◆ compile()

compile ( JsUtils  $js = NULL,
$view = NULL 
)

Definition at line 424 of file HtmlDropdown.php.

◆ count()

count ( )
Returns
int

Definition at line 255 of file HtmlDropdown.php.

◆ each()

each (   $callBack)

Definition at line 240 of file HtmlDropdown.php.

◆ fromDatabaseObject()

fromDatabaseObject (   $object,
  $function 
)

Definition at line 140 of file HtmlDropdown.php.

◆ getDataField()

getDataField ( )

Definition at line 70 of file HtmlDropdown.php.

◆ getField()

getField ( )

Definition at line 66 of file HtmlDropdown.php.

◆ getInput()

getInput ( )

Definition at line 429 of file HtmlDropdown.php.

◆ getItem()

getItem (   $index)

Definition at line 247 of file HtmlDropdown.php.

◆ insertItem()

insertItem (   $item,
  $position = 0 
)

Insert an item at a position.

Parameters
mixed$item
int$position
Returns
HtmlDropdownItem

Definition at line 104 of file HtmlDropdown.php.

◆ jsAddItem()

jsAddItem (   $caption,
  $value = null 
)

Definition at line 438 of file HtmlDropdown.php.

◆ removeArrow()

removeArrow ( )
protected

Definition at line 113 of file HtmlDropdown.php.

◆ run()

run ( JsUtils  $js)

Definition at line 382 of file HtmlDropdown.php.

◆ setAction()

setAction (   $action)

Definition at line 399 of file HtmlDropdown.php.

◆ setAllowAdditions()

setAllowAdditions (   $value)

Definition at line 414 of file HtmlDropdown.php.

◆ setClearable()

setClearable (   $value)

Definition at line 444 of file HtmlDropdown.php.

◆ setCompact()

setCompact ( )

Definition at line 393 of file HtmlDropdown.php.

◆ setDefaultText()

setDefaultText (   $text)

Definition at line 360 of file HtmlDropdown.php.

◆ setFullTextSearch()

setFullTextSearch (   $value)

Definition at line 419 of file HtmlDropdown.php.

◆ setIcon()

setIcon (   $icon = "dropdown")

Definition at line 433 of file HtmlDropdown.php.

◆ setInline()

setInline ( )

Definition at line 283 of file HtmlDropdown.php.

◆ setOn()

setOn (   $on)

Definition at line 404 of file HtmlDropdown.php.

◆ setOnAdd()

setOnAdd (   $jsCode)

Is called after a dropdown selection is added using a multiple select dropdown, only receives the added value Parameters addedValue, addedText, $addedChoice.

Definition at line 453 of file HtmlDropdown.php.

◆ setOnRemove()

setOnRemove (   $jsCode)

Is called after a dropdown selection is removed using a multiple select dropdown, only receives the removed value Parameters removedValue, removedText, $removedChoice.

Definition at line 462 of file HtmlDropdown.php.

◆ setPointing()

setPointing (   $value = Direction::NONE)

Definition at line 351 of file HtmlDropdown.php.

◆ setPropertyValues()

setPropertyValues (   $property,
  $values 
)

Sets the values of a property for each item in the collection.

Parameters
string$property
array | mixed$values
Returns
$this

Definition at line 224 of file HtmlDropdown.php.

◆ setSelect()

setSelect (   $name = NULL,
  $multiple = false 
)

Definition at line 324 of file HtmlDropdown.php.

◆ setShowOnFocus()

setShowOnFocus (   $value)

Definition at line 409 of file HtmlDropdown.php.

◆ setSimple()

setSimple ( )

Definition at line 289 of file HtmlDropdown.php.

◆ setValue()

setValue (   $value)

Definition at line 355 of file HtmlDropdown.php.

◆ setVertical()

setVertical ( )

Definition at line 277 of file HtmlDropdown.php.

Field Documentation

◆ $_associative

$_associative
protected

Definition at line 36 of file HtmlDropdown.php.

◆ $_multiple

$_multiple
protected

Definition at line 38 of file HtmlDropdown.php.

◆ $_params

$_params
protected
Initial value:
= array(
"action" => "nothing",
"on" => "hover",
"showOnFocus" => true
)

Definition at line 26 of file HtmlDropdown.php.

◆ $input

$input
protected

Definition at line 32 of file HtmlDropdown.php.

◆ $items

$items = array()
protected

Definition at line 24 of file HtmlDropdown.php.

◆ $mClass

$mClass = "menu"
protected

Definition at line 20 of file HtmlDropdown.php.

◆ $mTagName

$mTagName = "div"
protected

Definition at line 22 of file HtmlDropdown.php.

◆ $value

$value
protected

Definition at line 34 of file HtmlDropdown.php.


The documentation for this class was generated from the following file: