/** * Create and setup QListBox lstParentPagerHousehold * @param string $strControlId optional ControlId to use * @param QQCondition $objConditions override the default condition of QQ::All() to the query, itself * @param QQClause[] $objOptionalClauses additional optional QQClause object or array of QQClause objects for the query * @return QListBox */ public function lstParentPagerHousehold_Create($strControlId = null, QQCondition $objCondition = null, $objOptionalClauses = null) { $this->lstParentPagerHousehold = new QListBox($this->objParentObject, $strControlId); $this->lstParentPagerHousehold->Name = QApplication::Translate('Parent Pager Household'); $this->lstParentPagerHousehold->AddItem(QApplication::Translate('- Select One -'), null); // Setup and perform the Query if (is_null($objCondition)) { $objCondition = QQ::All(); } $objParentPagerHouseholdCursor = ParentPagerHousehold::QueryCursor($objCondition, $objOptionalClauses); // Iterate through the Cursor while ($objParentPagerHousehold = ParentPagerHousehold::InstantiateCursor($objParentPagerHouseholdCursor)) { $objListItem = new QListItem($objParentPagerHousehold->__toString(), $objParentPagerHousehold->Id); if ($this->objParentPagerIndividual->ParentPagerHousehold && $this->objParentPagerIndividual->ParentPagerHousehold->Id == $objParentPagerHousehold->Id) { $objListItem->Selected = true; } $this->lstParentPagerHousehold->AddItem($objListItem); } // Return the QListBox return $this->lstParentPagerHousehold; }