public function __construct($strText = '', $strValue = null, $strAnchor = null) { parent::__construct($strText, $strValue); if ($strAnchor) { $this->strAnchor = $strAnchor; } }
/** * Add the items to the project list. */ public function lstProjects_Bind() { $clauses[] = QQ::ExpandAsArray(QQN::Project()->PersonAsTeamMember); $objProjects = Project::QueryArray(QQ::All(), $clauses); foreach ($objProjects as $objProject) { $item = new QHListItem($objProject->Name); $item->Tag = 'ol'; $item->GetSubTagStyler()->OrderedListType = QOrderedListType::LowercaseRoman; foreach ($objProject->_PersonAsTeamMemberArray as $objPerson) { /**** * Here we add a sub-item to each item before adding the item to the main list. */ $item->AddItem($objPerson->FirstName . ' ' . $objPerson->LastName); } $this->lstProjects->AddItem($item); } }
public function __construct($strText = '', $strValue = null, $strAnchor = null) { parent::__construct($strText, $strValue); if ($strAnchor) { $this->strAnchor = $strAnchor; } else { $this->strAnchor = '#'; // need a default for attaching clicks and correct styling. } }
/** * Return the attributes for the sub tag that wraps the item tags * @param \QHListItem $objItem * @return array|null|string */ public function GetSubTagAttributes($objItem) { return $objItem->GetSubTagAttributes(); }
public function __set($strText, $mixValue) { switch ($strText) { case "ImageUrl": try { $this->strImageUrl = \QType::Cast($mixValue, \QType::String); break; } catch (\QInvalidCastException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case "AltText": try { $this->strAltText = \QType::Cast($mixValue, \QType::String); break; } catch (\QInvalidCastException $objExc) { $objExc->IncrementOffset(); throw $objExc; } default: try { parent::__set($strText, $mixValue); } catch (\QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } break; } }