/** * Create and setup QListBox lstDonationStewardshipFund * @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 lstDonationStewardshipFund_Create($strControlId = null, QQCondition $objCondition = null, $objOptionalClauses = null) { $this->lstDonationStewardshipFund = new QListBox($this->objParentObject, $strControlId); $this->lstDonationStewardshipFund->Name = QApplication::Translate('Donation Stewardship Fund'); $this->lstDonationStewardshipFund->AddItem(QApplication::Translate('- Select One -'), null); // Setup and perform the Query if (is_null($objCondition)) { $objCondition = QQ::All(); } $objDonationStewardshipFundCursor = StewardshipFund::QueryCursor($objCondition, $objOptionalClauses); // Iterate through the Cursor while ($objDonationStewardshipFund = StewardshipFund::InstantiateCursor($objDonationStewardshipFundCursor)) { $objListItem = new QListItem($objDonationStewardshipFund->__toString(), $objDonationStewardshipFund->Id); if ($this->objSignupForm->DonationStewardshipFund && $this->objSignupForm->DonationStewardshipFund->Id == $objDonationStewardshipFund->Id) { $objListItem->Selected = true; } $this->lstDonationStewardshipFund->AddItem($objListItem); } // Return the QListBox return $this->lstDonationStewardshipFund; }