Example #1
0
 public function __construct($strText = '', $strValue = null, $strAnchor = null)
 {
     parent::__construct($strText, $strValue);
     if ($strAnchor) {
         $this->strAnchor = $strAnchor;
     }
 }
Example #2
0
 /**
  * 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);
     }
 }
Example #3
0
 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.
     }
 }
Example #4
0
 /**
  * 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();
 }
Example #5
0
 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;
     }
 }