rapila
Public Member Functions | Static Public Member Functions | List of all members
TagWriter Class Reference

Public Member Functions

 __construct ($sTagName, $aParameters=array(), $sContent="")
 
 setParameter ($sName, $sValue)
 
 getParameter ($sName)
 
 hasParameter ($sName)
 
 addToParameter ($sName, $sValue)
 
 parse ($bContentIsEscaped=false)
 
 __toString ()
 

Static Public Member Functions

static quickTag ($sTagName= 'div', $aParameters=array(), $sContent= '')
 
static getEmailLinkWriter ($sLinkUrl, $sText=null, $sQuery='')
 
static writeEmailLink ($sLinkUrl, $sText)
 
static optionsFromArray ($aKeyValues, $mSelected=null, $sIndentType='┼', $aCustomOptions=array(''=> '------'), $bStrict=false)
 
static optionsFromObjects ($aObjects, $sKeyMethod=null, $sValueMethod=null, $mSelected=null, $aCustomOptions=array( ''=> '------'), $bStrict=false)
 
static listItemsFromArray ($aArray)
 
static tableFromArray ($aParams, $sClassName='doc_types')
 

Member Function Documentation

static TagWriter::optionsFromArray (   $aKeyValues,
  $mSelected = null,
  $sIndentType = '┼',
  $aCustomOptions = array('' => '------'),
  $bStrict = false 
)
static

Helper method to generate the HTML for a <select> element using the values from an array.

Parameters
array$aKeyValuesAssoc array (optionvalue => optiondisplayname) or hash (optionvalue => array('value'=> displayname, 'level'=>integer for indenting of nested items)
string | array$mSelectedThe selected item
string$sIndentTypeoptional indent char for nested items, requires value as array including param 'level'
array | null$aCustomOptionscustom options to prepend to the array (for convenience)
boolean$bStrictWhether to do strict comparisons when trying to find the selected item
Returns
string of html options

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