コード例 #1
0
 /**
  * Creates a QListItem
  *
  * @param string  $strName      is the displayed Name of the Item
  * @param string  $strValue     is any text that represents the value of the ListItem (e.g. maybe a DB Id)
  * @param boolean $blnSelected  is a boolean of whether or not this item is selected or not (optional)
  * @param string  $strItemGroup is the group (if any) in which the Item should be displayed
  * @param array|string   $mixOverrideParameters
  *                              allows you to override item styles.  It is either a string formatted as Property=Value
  *                              or an array of the format array(property => value)
  *
  * @throws Exception|QCallerException
  * @return QListItem
  */
 public function __construct($strName, $strValue = null, $blnSelected = false, $strItemGroup = null, $mixOverrideParameters = null)
 {
     parent::__construct($strName, $strValue);
     $this->blnSelected = $blnSelected;
     $this->strItemGroup = $strItemGroup;
     // Override parameters get applied here
     $strOverrideArray = func_get_args();
     if (count($strOverrideArray) > 4) {
         throw new QCallerException("Please provide either a string, or an array, but not multiple parameters");
     }
     if ($mixOverrideParameters) {
         $this->GetStyle()->OverrideAttributes($mixOverrideParameters);
     }
 }
コード例 #2
0
 /**
  * Creates a QListItem
  *
  * @param string  $strName		is the displayed Name or Text of the Item
  * @param string|null  $strValue     is any text that represents the value of the ListItem (e.g. maybe a DB Id)
  * @param string|null $strAnchor 	is an href anchor that will be associated with item
  *
  * @throws Exception|QCallerException
  */
 public function __construct($strName, $strValue = null, $strAnchor = null)
 {
     parent::__construct($strName, $strValue);
     $this->strAnchor = $strAnchor;
 }