public function group() { $col_name = "association_group_id"; $group = null; if (isset($this->{$col_name}) && is_numeric($this->{$col_name})) { $group_id = $this->{$col_name}; require_once 'class.mt_group.php'; $group = new Group(); $group->Load("group_id = {$group_id}"); } return $group; }
protected function SetupPanel() { // Get the group and check for validity / authorization $this->objGroup = Group::Load($this->strUrlHashArgument); if (!$this->objGroup) { return $this->ReturnTo('#groups'); } if (!$this->objGroup->IsLoginCanView(QApplication::$Login)) { return $this->ReturnTo('#groups'); } $this->objDelegate = new EditGroupParticipationDelegate($this, '#groups'); }
/** * Override method to perform a property "Get" * This will get the value of $strName * * @param string $strName Name of the property to get * @return mixed */ public function __get($strName) { switch ($strName) { /////////////////// // Member Variables /////////////////// case 'Id': // Gets the value for intId (Read-Only PK) // @return integer return $this->intId; case 'EmailMessageId': // Gets the value for intEmailMessageId (Not Null) // @return integer return $this->intEmailMessageId; case 'GroupId': // Gets the value for intGroupId // @return integer return $this->intGroupId; case 'CommunicationListId': // Gets the value for intCommunicationListId // @return integer return $this->intCommunicationListId; case 'LoginId': // Gets the value for intLoginId // @return integer return $this->intLoginId; case 'CommunicationListEntryId': // Gets the value for intCommunicationListEntryId // @return integer return $this->intCommunicationListEntryId; case 'PersonId': // Gets the value for intPersonId // @return integer return $this->intPersonId; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'EmailMessage': // Gets the value for the EmailMessage object referenced by intEmailMessageId (Not Null) // @return EmailMessage try { if (!$this->objEmailMessage && !is_null($this->intEmailMessageId)) { $this->objEmailMessage = EmailMessage::Load($this->intEmailMessageId); } return $this->objEmailMessage; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'Group': // Gets the value for the Group object referenced by intGroupId // @return Group try { if (!$this->objGroup && !is_null($this->intGroupId)) { $this->objGroup = Group::Load($this->intGroupId); } return $this->objGroup; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'CommunicationList': // Gets the value for the CommunicationList object referenced by intCommunicationListId // @return CommunicationList try { if (!$this->objCommunicationList && !is_null($this->intCommunicationListId)) { $this->objCommunicationList = CommunicationList::Load($this->intCommunicationListId); } return $this->objCommunicationList; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'Login': // Gets the value for the Login object referenced by intLoginId // @return Login try { if (!$this->objLogin && !is_null($this->intLoginId)) { $this->objLogin = Login::Load($this->intLoginId); } return $this->objLogin; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'CommunicationListEntry': // Gets the value for the CommunicationListEntry object referenced by intCommunicationListEntryId // @return CommunicationListEntry try { if (!$this->objCommunicationListEntry && !is_null($this->intCommunicationListEntryId)) { $this->objCommunicationListEntry = CommunicationListEntry::Load($this->intCommunicationListEntryId); } return $this->objCommunicationListEntry; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'Person': // Gets the value for the Person object referenced by intPersonId // @return Person try { if (!$this->objPerson && !is_null($this->intPersonId)) { $this->objPerson = Person::Load($this->intPersonId); } return $this->objPerson; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// case '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
/** * Override method to perform a property "Get" * This will get the value of $strName * * @param string $strName Name of the property to get * @return mixed */ public function __get($strName) { switch ($strName) { /////////////////// // Member Variables /////////////////// case 'Id': // Gets the value for intId (Read-Only PK) // @return integer return $this->intId; case 'GroupId': // Gets the value for intGroupId (Not Null) // @return integer return $this->intGroupId; case 'LoginId': // Gets the value for intLoginId (Not Null) // @return integer return $this->intLoginId; case 'Subject': // Gets the value for strSubject // @return string return $this->strSubject; case 'Body': // Gets the value for strBody // @return string return $this->strBody; case 'DateQueued': // Gets the value for dttDateQueued (Not Null) // @return QDateTime return $this->dttDateQueued; case 'DateSent': // Gets the value for dttDateSent // @return QDateTime return $this->dttDateSent; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'Group': // Gets the value for the Group object referenced by intGroupId (Not Null) // @return Group try { if (!$this->objGroup && !is_null($this->intGroupId)) { $this->objGroup = Group::Load($this->intGroupId); } return $this->objGroup; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'Login': // Gets the value for the Login object referenced by intLoginId (Not Null) // @return Login try { if (!$this->objLogin && !is_null($this->intLoginId)) { $this->objLogin = Login::Load($this->intLoginId); } return $this->objLogin; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// case '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
/** * Override method to perform a property "Get" * This will get the value of $strName * * @param string $strName Name of the property to get * @return mixed */ public function __get($strName) { switch ($strName) { /////////////////// // Member Variables /////////////////// case 'GroupId': // Gets the value for intGroupId (PK) // @return integer return $this->intGroupId; case 'GrowthGroupLocationId': // Gets the value for intGrowthGroupLocationId (Not Null) // @return integer return $this->intGrowthGroupLocationId; case 'GrowthGroupDayTypeId': // Gets the value for intGrowthGroupDayTypeId // @return integer return $this->intGrowthGroupDayTypeId; case 'MeetingBitmap': // Gets the value for intMeetingBitmap // @return integer return $this->intMeetingBitmap; case 'StartTime': // Gets the value for intStartTime // @return integer return $this->intStartTime; case 'EndTime': // Gets the value for intEndTime // @return integer return $this->intEndTime; case 'Address1': // Gets the value for strAddress1 // @return string return $this->strAddress1; case 'Address2': // Gets the value for strAddress2 // @return string return $this->strAddress2; case 'CrossStreet1': // Gets the value for strCrossStreet1 // @return string return $this->strCrossStreet1; case 'CrossStreet2': // Gets the value for strCrossStreet2 // @return string return $this->strCrossStreet2; case 'ZipCode': // Gets the value for strZipCode // @return string return $this->strZipCode; case 'Longitude': // Gets the value for fltLongitude // @return double return $this->fltLongitude; case 'Latitude': // Gets the value for fltLatitude // @return double return $this->fltLatitude; case 'Accuracy': // Gets the value for intAccuracy // @return integer return $this->intAccuracy; case 'Description': // Gets the value for strDescription // @return string return $this->strDescription; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'Group': // Gets the value for the Group object referenced by intGroupId (PK) // @return Group try { if (!$this->objGroup && !is_null($this->intGroupId)) { $this->objGroup = Group::Load($this->intGroupId); } return $this->objGroup; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'GrowthGroupLocation': // Gets the value for the GrowthGroupLocation object referenced by intGrowthGroupLocationId (Not Null) // @return GrowthGroupLocation try { if (!$this->objGrowthGroupLocation && !is_null($this->intGrowthGroupLocationId)) { $this->objGrowthGroupLocation = GrowthGroupLocation::Load($this->intGrowthGroupLocationId); } return $this->objGrowthGroupLocation; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// case '_GrowthGroupStructure': // Gets the value for the private _objGrowthGroupStructure (Read-Only) // if set due to an expansion on the growthgroupstructure_growthgroup_assn association table // @return GrowthGroupStructure return $this->_objGrowthGroupStructure; case '_GrowthGroupStructureArray': // Gets the value for the private _objGrowthGroupStructureArray (Read-Only) // if set due to an ExpandAsArray on the growthgroupstructure_growthgroup_assn association table // @return GrowthGroupStructure[] return (array) $this->_objGrowthGroupStructureArray; case '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
/** * Override method to perform a property "Get" * This will get the value of $strName * * @param string $strName Name of the property to get * @return mixed */ public function __get($strName) { switch ($strName) { /////////////////// // Member Variables /////////////////// case 'Id': // Gets the value for intId (Read-Only PK) // @return integer return $this->intId; case 'PersonId': // Gets the value for intPersonId (Not Null) // @return integer return $this->intPersonId; case 'GroupId': // Gets the value for intGroupId (Not Null) // @return integer return $this->intGroupId; case 'GroupRoleId': // Gets the value for intGroupRoleId // @return integer return $this->intGroupRoleId; case 'DateStart': // Gets the value for dttDateStart (Not Null) // @return QDateTime return $this->dttDateStart; case 'DateEnd': // Gets the value for dttDateEnd // @return QDateTime return $this->dttDateEnd; case 'Status': // Gets the value for intStatus // @return integer return $this->intStatus; case 'DateFollowup': // Gets the value for dttDateFollowup // @return QDateTime return $this->dttDateFollowup; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'Person': // Gets the value for the Person object referenced by intPersonId (Not Null) // @return Person try { if (!$this->objPerson && !is_null($this->intPersonId)) { $this->objPerson = Person::Load($this->intPersonId); } return $this->objPerson; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'Group': // Gets the value for the Group object referenced by intGroupId (Not Null) // @return Group try { if (!$this->objGroup && !is_null($this->intGroupId)) { $this->objGroup = Group::Load($this->intGroupId); } return $this->objGroup; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'GroupRole': // Gets the value for the GroupRole object referenced by intGroupRoleId // @return GroupRole try { if (!$this->objGroupRole && !is_null($this->intGroupRoleId)) { $this->objGroupRole = GroupRole::Load($this->intGroupRoleId); } return $this->objGroupRole; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// case '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
public function pnlGroup_Refresh($mixGroup) { if ($mixGroup instanceof Group) { $objGroup = $mixGroup; $intGroupId = $objGroup->Id; } else { $intGroupId = $mixGroup; $objGroup = Group::Load($intGroupId); } $pnlGroup = $this->GetControl('pnlGroup' . $intGroupId); if ($pnlGroup) { $strName = $objGroup->Name; // Add Pointer $strName = $objGroup->HierarchyLevel ? '> ' . $strName : $strName; // Add Indent $strPadding = 'padding-left: ' . ($objGroup->HierarchyLevel * 10 + 10) . 'px;'; $pnlGroup->Text = sprintf('<a href="#%s" style="%s" %s>%s</a>', $objGroup->Id, $strPadding, $this->objGroup && $this->objGroup->Id == $intGroupId ? 'class="selected"' : null, $strName); if ($this->objGroup && $this->objGroup->Id == $intGroupId) { $pnlGroup->AddCssClass('selected'); } else { $pnlGroup->RemoveCssClass('selected'); } } }
public function dtgGroups_Bind() { $objConditions = QQ::All(); $objClauses = array(); $objConditions = QQ::AndCondition($objConditions, QQ::Equal(QQN::GrowthGroup()->Group->ActiveFlag, true)); if ($this->chkDayOfWeek->Checked) { // Map to Days of Week $dayArray = array(); foreach (GrowthGroupDayType::$NameArray as $key => $value) { if (strpos(strtolower($this->objRegistrant->GroupDay), strtolower($value)) !== false) { $dayArray[] = $key; } } $objConditions = QQ::AndCondition($objConditions, QQ::In(QQN::GrowthGroup()->GrowthGroupDayTypeId, $dayArray)); } $growthGroupArray = GrowthGroup::QueryArray($objConditions); if ($this->chkGroupType->Checked) { $requestedGroupStructureArray = array(); foreach (GrowthGroupStructure::LoadAll() as $objGroupStructure) { if ($this->objRegistrant->IsGrowthGroupStructureAsGroupstructureAssociated($objGroupStructure)) { $requestedGroupStructureArray[] = $objGroupStructure; } } $newGrowthGroupArray = array(); foreach ($growthGroupArray as $objGroup) { foreach ($requestedGroupStructureArray as $objGroupStructure) { if ($objGroup->IsGrowthGroupStructureAssociated($objGroupStructure)) { $newGrowthGroupArray[] = $objGroup; break; } } } $growthGroupArray = $newGrowthGroupArray; } if ($this->chkAvailability->Checked) { $newGrowthGroupArray = array(); $intClosed = 0; foreach (AvailabilityStatus::LoadAll() as $objStatus) { if ($objStatus->Name == 'Closed') { $intClosed = $objStatus->Id; } } foreach ($growthGroupArray as $objGroup) { $intStatus = Group::Load($objGroup->GroupId)->Status; if ($intStatus != $intClosed) { $newGrowthGroupArray[] = $objGroup; } } $growthGroupArray = $newGrowthGroupArray; } if ($this->chkLocation->Checked) { // Map to our existing Growth Group Locations $locationIdArray = array(); $strLocationArray = array($this->objRegistrant->PreferredLocation1, $this->objRegistrant->PreferredLocation2); for ($i = 0; $i < 2; $i++) { if (null != $strLocationArray[$i]) { switch ($strLocationArray[$i]) { case 'Foster City': case 'San Bruno': case 'San Carlos': case 'San Mateo': case 'San Francisco': case 'South San Francisco': $locationIdArray[] = 1; break; case 'East Palo Alto': case 'Mountain View': case 'Menlo Park': case 'Palo Alto': case 'Redwood City': $locationIdArray[] = 2; break; case 'Campbell': case 'Cupertino': case 'Los Altos': case 'Sunnyvale': $locationIdArray[] = 3; break; case 'San Jose': case 'South San Jose': case 'Santa Clara': $locationIdArray[] = 4; break; case 'Fremont': case 'Milpitas': case 'Newark ': case 'Pleasanton': case 'Tracy': $locationIdArray[] = 5; break; case 'Oakland': case 'Clayton': $locationIdArray[] = 6; break; } } } $newGrowthGroupArray = array(); foreach ($growthGroupArray as $objGroup) { if (in_array($objGroup->GrowthGroupLocationId, $locationIdArray)) { $newGrowthGroupArray[] = $objGroup; } } $growthGroupArray = $newGrowthGroupArray; } $this->dtgGroups->DataSource = $growthGroupArray; }
/** * Override method to perform a property "Get" * This will get the value of $strName * * @param string $strName Name of the property to get * @return mixed */ public function __get($strName) { switch ($strName) { /////////////////// // Member Variables /////////////////// case 'GroupId': // Gets the value for intGroupId (PK) // @return integer return $this->intGroupId; case 'DateRefreshed': // Gets the value for dttDateRefreshed // @return QDateTime return $this->dttDateRefreshed; case 'ProcessTimeMs': // Gets the value for intProcessTimeMs // @return integer return $this->intProcessTimeMs; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'Group': // Gets the value for the Group object referenced by intGroupId (PK) // @return Group try { if (!$this->objGroup && !is_null($this->intGroupId)) { $this->objGroup = Group::Load($this->intGroupId); } return $this->objGroup; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// case '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
/** * Override method to perform a property "Get" * This will get the value of $strName * * @param string $strName Name of the property to get * @return mixed */ public function __get($strName) { switch ($strName) { /////////////////// // Member Variables /////////////////// case 'GroupId': // Gets the value for intGroupId (PK) // @return integer return $this->intGroupId; case 'Query': // Gets the value for strQuery // @return string return $this->strQuery; case 'DateRefreshed': // Gets the value for dttDateRefreshed // @return QDateTime return $this->dttDateRefreshed; case 'ProcessTimeMs': // Gets the value for intProcessTimeMs // @return integer return $this->intProcessTimeMs; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'Group': // Gets the value for the Group object referenced by intGroupId (PK) // @return Group try { if (!$this->objGroup && !is_null($this->intGroupId)) { $this->objGroup = Group::Load($this->intGroupId); } return $this->objGroup; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'SearchQuery': // Gets the value for the SearchQuery object that uniquely references this SmartGroup // by objSearchQuery (Unique) // @return SearchQuery try { if ($this->objSearchQuery === false) { // We've attempted early binding -- and the reverse reference object does not exist return null; } if (!$this->objSearchQuery) { $this->objSearchQuery = SearchQuery::LoadBySmartGroupId($this->intGroupId); } return $this->objSearchQuery; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// case '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
/** * Override method to perform a property "Get" * This will get the value of $strName * * @param string $strName Name of the property to get * @return mixed */ public function __get($strName) { switch ($strName) { /////////////////// // Member Variables /////////////////// case 'Id': // Gets the value for intId (Read-Only PK) // @return integer return $this->intId; case 'GroupTypeId': // Gets the value for intGroupTypeId (Not Null) // @return integer return $this->intGroupTypeId; case 'MinistryId': // Gets the value for intMinistryId (Not Null) // @return integer return $this->intMinistryId; case 'Name': // Gets the value for strName // @return string return $this->strName; case 'Description': // Gets the value for strDescription // @return string return $this->strDescription; case 'ParentGroupId': // Gets the value for intParentGroupId // @return integer return $this->intParentGroupId; case 'HierarchyLevel': // Gets the value for intHierarchyLevel // @return integer return $this->intHierarchyLevel; case 'HierarchyOrderNumber': // Gets the value for intHierarchyOrderNumber // @return integer return $this->intHierarchyOrderNumber; case 'ConfidentialFlag': // Gets the value for blnConfidentialFlag // @return boolean return $this->blnConfidentialFlag; case 'EmailBroadcastTypeId': // Gets the value for intEmailBroadcastTypeId // @return integer return $this->intEmailBroadcastTypeId; case 'Token': // Gets the value for strToken (Unique) // @return string return $this->strToken; case 'ActiveFlag': // Gets the value for blnActiveFlag // @return boolean return $this->blnActiveFlag; case 'Status': // Gets the value for intStatus // @return integer return $this->intStatus; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'Ministry': // Gets the value for the Ministry object referenced by intMinistryId (Not Null) // @return Ministry try { if (!$this->objMinistry && !is_null($this->intMinistryId)) { $this->objMinistry = Ministry::Load($this->intMinistryId); } return $this->objMinistry; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'ParentGroup': // Gets the value for the Group object referenced by intParentGroupId // @return Group try { if (!$this->objParentGroup && !is_null($this->intParentGroupId)) { $this->objParentGroup = Group::Load($this->intParentGroupId); } return $this->objParentGroup; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'StatusObject': // Gets the value for the AvailabilityStatus object referenced by intStatus // @return AvailabilityStatus try { if (!$this->objStatusObject && !is_null($this->intStatus)) { $this->objStatusObject = AvailabilityStatus::Load($this->intStatus); } return $this->objStatusObject; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'GroupCategory': // Gets the value for the GroupCategory object that uniquely references this Group // by objGroupCategory (Unique) // @return GroupCategory try { if ($this->objGroupCategory === false) { // We've attempted early binding -- and the reverse reference object does not exist return null; } if (!$this->objGroupCategory) { $this->objGroupCategory = GroupCategory::LoadByGroupId($this->intId); } return $this->objGroupCategory; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'GrowthGroup': // Gets the value for the GrowthGroup object that uniquely references this Group // by objGrowthGroup (Unique) // @return GrowthGroup try { if ($this->objGrowthGroup === false) { // We've attempted early binding -- and the reverse reference object does not exist return null; } if (!$this->objGrowthGroup) { $this->objGrowthGroup = GrowthGroup::LoadByGroupId($this->intId); } return $this->objGrowthGroup; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'SmartGroup': // Gets the value for the SmartGroup object that uniquely references this Group // by objSmartGroup (Unique) // @return SmartGroup try { if ($this->objSmartGroup === false) { // We've attempted early binding -- and the reverse reference object does not exist return null; } if (!$this->objSmartGroup) { $this->objSmartGroup = SmartGroup::LoadByGroupId($this->intId); } return $this->objSmartGroup; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// //////////////////////////// // Virtual Object References (Many to Many and Reverse References) // (If restored via a "Many-to" expansion) //////////////////////////// case '_EmailMessageRoute': // Gets the value for the private _objEmailMessageRoute (Read-Only) // if set due to an expansion on the email_message_route.group_id reverse relationship // @return EmailMessageRoute return $this->_objEmailMessageRoute; case '_EmailMessageRouteArray': // Gets the value for the private _objEmailMessageRouteArray (Read-Only) // if set due to an ExpandAsArray on the email_message_route.group_id reverse relationship // @return EmailMessageRoute[] return (array) $this->_objEmailMessageRouteArray; case '_ChildGroup': // Gets the value for the private _objChildGroup (Read-Only) // if set due to an expansion on the group.parent_group_id reverse relationship // @return Group return $this->_objChildGroup; case '_ChildGroupArray': // Gets the value for the private _objChildGroupArray (Read-Only) // if set due to an ExpandAsArray on the group.parent_group_id reverse relationship // @return Group[] return (array) $this->_objChildGroupArray; case '_GroupAuthorizedSender': // Gets the value for the private _objGroupAuthorizedSender (Read-Only) // if set due to an expansion on the group_authorized_sender.group_id reverse relationship // @return GroupAuthorizedSender return $this->_objGroupAuthorizedSender; case '_GroupAuthorizedSenderArray': // Gets the value for the private _objGroupAuthorizedSenderArray (Read-Only) // if set due to an ExpandAsArray on the group_authorized_sender.group_id reverse relationship // @return GroupAuthorizedSender[] return (array) $this->_objGroupAuthorizedSenderArray; case '_GroupParticipation': // Gets the value for the private _objGroupParticipation (Read-Only) // if set due to an expansion on the group_participation.group_id reverse relationship // @return GroupParticipation return $this->_objGroupParticipation; case '_GroupParticipationArray': // Gets the value for the private _objGroupParticipationArray (Read-Only) // if set due to an ExpandAsArray on the group_participation.group_id reverse relationship // @return GroupParticipation[] return (array) $this->_objGroupParticipationArray; case '_SmsMessage': // Gets the value for the private _objSmsMessage (Read-Only) // if set due to an expansion on the sms_message.group_id reverse relationship // @return SmsMessage return $this->_objSmsMessage; case '_SmsMessageArray': // Gets the value for the private _objSmsMessageArray (Read-Only) // if set due to an ExpandAsArray on the sms_message.group_id reverse relationship // @return SmsMessage[] return (array) $this->_objSmsMessageArray; case '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }
<?php require dirname(__FILE__) . '/../../includes/prepend.inc.php'; QApplication::Authenticate(); $objGroup = Group::Load(QApplication::PathInfo(0)); if (!$objGroup) { QApplication::Redirect('/'); } if (!$objGroup->IsLoginCanView(QApplication::$Login)) { QApplication::Redirect('/'); } // Disable strict no-cache for IE due to IE issues with downloading no-cache items if (QApplication::IsBrowser(QBrowserType::InternetExplorer)) { header("Pragma:"); header("Expires:"); } header('Content-Type: text/csv'); header('Content-Disposition: attachment; filename=' . $objGroup->CsvFilename); print "First Name,Last Name,E-mail,Phone,Address,City,State,Zip Code,Ok to Mail, Deceased,Birthdate\r\n"; $objPersonCursor = Person::QueryCursor(QQ::AndCondition(QQ::Equal(QQN::Person()->GroupParticipation->GroupId, $objGroup->Id), QQ::IsNull(QQN::Person()->GroupParticipation->DateEnd)), QQ::Clause(QQ::OrderBy(QQN::Person()->LastName, QQN::Person()->FirstName), QQ::Distinct())); function EscapeCsv($strString) { return '"' . str_replace('"', '""', $strString) . '"'; } while ($objPerson = Person::InstantiateCursor($objPersonCursor)) { print EscapeCsv($objPerson->FirstName); print ","; print EscapeCsv($objPerson->LastName); print ","; if ($objPerson->PrimaryEmail) { print EscapeCsv($objPerson->PrimaryEmail->Address);
/** * Static Helper Method to Create using PK arguments * You must pass in the PK arguments on an object to load, or leave it blank to create a new one. * If you want to load via QueryString or PathInfo, use the CreateFromQueryString or CreateFromPathInfo * static helper methods. Finally, specify a CreateType to define whether or not we are only allowed to * edit, or if we are also allowed to create a new one, etc. * * @param mixed $objParentObject QForm or QPanel which will be using this GroupMetaControl * @param integer $intId primary key value * @param QMetaControlCreateType $intCreateType rules governing Group object creation - defaults to CreateOrEdit * @return GroupMetaControl */ public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit) { // Attempt to Load from PK Arguments if (strlen($intId)) { $objGroup = Group::Load($intId); // Group was found -- return it! if ($objGroup) { return new GroupMetaControl($objParentObject, $objGroup); } else { if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound) { throw new QCallerException('Could not find a Group object with PK arguments: ' . $intId); } } // If EditOnly is specified, throw an exception } else { if ($intCreateType == QMetaControlCreateType::EditOnly) { throw new QCallerException('No PK arguments specified'); } } // If we are here, then we need to create a new record return new GroupMetaControl($objParentObject, new Group()); }