当前位置: 首页>>代码示例>>PHP>>正文


PHP Person::Load方法代码示例

本文整理汇总了PHP中Person::Load方法的典型用法代码示例。如果您正苦于以下问题:PHP Person::Load方法的具体用法?PHP Person::Load怎么用?PHP Person::Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Person的用法示例。


在下文中一共展示了Person::Load方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: chkSelected_Click

 protected function chkSelected_Click($strFormId, $strControlId, $strParameter)
 {
     // We look to the Parameter for the ID of the person being checked
     $arrParameters = explode(',', $strParameter);
     $intPersonId = $arrParameters[0];
     // Let's get the selected person
     $objPerson = Person::Load($intPersonId);
     $chkSelected = $this->GetControl($strControlId);
     // Let's respond to the user what just happened
     if ($chkSelected->Checked) {
         $strResponse = QApplication::HtmlEntities('You just selected ' . $objPerson->FirstName . ' ' . $objPerson->LastName . '.');
     } else {
         $strResponse = QApplication::HtmlEntities('You just deselected ' . $objPerson->FirstName . ' ' . $objPerson->LastName . '.');
     }
     $strResponse .= '<br/>';
     // Now, let's go through all the checkboxes and list everyone who has been selected
     $arrPeople = $this->colSelect->GetSelectedItems('Person');
     $strNameArray = array();
     foreach ($arrPeople as $objPerson) {
         $strName = QApplication::HtmlEntities($objPerson->FirstName . ' ' . $objPerson->LastName);
         $strNameArray[] = $strName;
     }
     $strResponse .= 'The list of people who are currently selected: ' . implode(', ', $strNameArray);
     // Provide feedback to the user by updating the Response label
     $this->lblResponse->Text = $strResponse;
 }
开发者ID:tomVertuoz,项目名称:framework,代码行数:26,代码来源:qcheckboxcolumn.php

示例2: btnSave_Click

 public function btnSave_Click($strFormId, $strControlId, $strParameter)
 {
     //Create New Group from information stored in mctGroup
     $objCloneGroup = new Group();
     // Update any fields for controls that have been created
     if ($this->mctGroup->GroupTypeIdControl) {
         $objCloneGroup->GroupTypeId = $this->mctGroup->GroupTypeIdControl->SelectedValue;
     }
     if ($this->mctGroup->MinistryIdControl) {
         $objCloneGroup->MinistryId = $this->mctGroup->MinistryIdControl->SelectedValue;
     }
     if ($this->mctGroup->NameControl) {
         $objCloneGroup->Name = $this->mctGroup->NameControl->Text;
     }
     if ($this->mctGroup->DescriptionControl) {
         $objCloneGroup->Description = $this->mctGroup->DescriptionControl->Text;
     }
     if ($this->mctGroup->ParentGroupIdControl) {
         $objCloneGroup->ParentGroupId = $this->mctGroup->ParentGroupIdControl->SelectedValue;
     }
     if ($this->mctGroup->HierarchyLevelControl) {
         $objCloneGroup->HierarchyLevel = $this->mctGroup->HierarchyLevelControl->Text;
     }
     if ($this->mctGroup->HierarchyOrderNumberControl) {
         $objCloneGroup->HierarchyOrderNumber = $this->mctGroup->HierarchyOrderNumberControl->Text;
     }
     if ($this->mctGroup->ConfidentialFlagControl) {
         $objCloneGroup->ConfidentialFlag = $this->mctGroup->ConfidentialFlagControl->Checked;
     }
     if ($this->mctGroup->EmailBroadcastTypeIdControl) {
         $objCloneGroup->EmailBroadcastTypeId = $this->mctGroup->EmailBroadcastTypeIdControl->SelectedValue;
     }
     if ($this->mctGroup->TokenControl) {
         $objCloneGroup->Token = $this->mctGroup->TokenControl->Text;
     }
     if ($this->mctGroup->ActiveFlagControl) {
         $objCloneGroup->ActiveFlag = $this->mctGroup->ActiveFlagControl->Checked;
     }
     // Update any UniqueReverseReferences (if any) for controls that have been created for it
     if ($this->mctGroup->GroupCategoryControl) {
         $objCloneGroup->GroupCategory = GroupCategory::Load($this->mctGroup->GroupCategoryControl->SelectedValue);
     }
     if ($this->mctGroup->GrowthGroupControl) {
         $objCloneGroup->GrowthGroup = GrowthGroup::Load($this->mctGroup->GrowthGroupControl->SelectedValue);
     }
     if ($this->mctGroup->SmartGroupControl) {
         $objCloneGroup->SmartGroup = SmartGroup::Load($this->mctGroup->SmartGroupControl->SelectedValue);
     }
     // Save the Cloned Group object
     $objCloneGroup->Save();
     // Get Participation List and propogate it
     $objGroupParticipationArray = $this->mctGroup->Group->GetActiveGroupParticipationArray();
     foreach ($objGroupParticipationArray as $objGroupParticipation) {
         $objCloneGroup->AddPerson(Person::Load($objGroupParticipation->PersonId), $objGroupParticipation->GroupRoleId);
     }
     Group::RefreshHierarchyDataForMinistry($objCloneGroup->MinistryId);
     $this->objForm->pnlGroups_Refresh();
     // Go to new Group.
     $this->ReturnTo('#' . $objCloneGroup->Id);
 }
开发者ID:alcf,项目名称:chms,代码行数:60,代码来源:CpGroup_CloneGroup.class.php

示例3: pxyName_Click

 public function pxyName_Click($strFormId, $strControlId, $strParameter)
 {
     $objPerson = Person::Load($strParameter);
     $strMethodCallback = $this->strMethodCallback;
     if ($this->objParentControl) {
         $this->objParentControl->{$strMethodCallback}($objPerson);
     } else {
         $this->objForm->{$strMethodCallback}($objPerson);
     }
     $this->HideDialogBox();
 }
开发者ID:qcodo,项目名称:qcodo-website,代码行数:11,代码来源:PersonSelectorDialog.class.php

示例4: SetupPanel

 protected function SetupPanel()
 {
     if (!$this->objGroup->IsLoginCanEdit(QApplication::$Login)) {
         $this->ReturnTo('/groups/');
     }
     // Get the person and check for validity / authorization
     $this->objPerson = Person::Load($this->strUrlHashArgument);
     if (!$this->objPerson) {
         return $this->ReturnTo('#' . $this->objGroup->Id);
     }
     // See if Group can have Explicitly Defined Participants
     if (!$this->objGroup->IsGroupCanHaveExplicitlyDefinedParticipants()) {
         return $this->ReturnTo('#' . $this->objGroup->Id);
     }
     $this->objDelegate = new EditGroupParticipationDelegate($this, '#' . $this->objGroup->Id);
 }
开发者ID:alcf,项目名称:chms,代码行数:16,代码来源:CpGroup_EditParticipation.class.php

示例5: SetupPanel

 protected function SetupPanel()
 {
     $this->objPersonMergeWith = Person::Load($this->strUrlHashArgument);
     if (!$this->objPersonMergeWith || $this->objPersonMergeWith->Id == $this->objPerson->Id) {
         return $this->ReturnTo($this->objPerson->LinkUrl);
     }
     // Do the households match up okay?
     $blnHouseholdOkay = true;
     if ($this->objPerson->HouseholdAsHead) {
         foreach ($this->objPersonMergeWith->GetHouseholdParticipationArray() as $objHouseholdParticipation) {
             if ($objHouseholdParticipation->HouseholdId != $this->objPerson->HouseholdAsHead->Id) {
                 if ($objHouseholdParticipation->Household->CountHouseholdParticipations() > 1) {
                     $blnHouseholdOkay = false;
                 }
             }
         }
     }
     if ($this->objPersonMergeWith->HouseholdAsHead) {
         foreach ($this->objPerson->GetHouseholdParticipationArray() as $objHouseholdParticipation) {
             if ($objHouseholdParticipation->HouseholdId != $this->objPersonMergeWith->HouseholdAsHead->Id) {
                 if ($objHouseholdParticipation->Household->CountHouseholdParticipations() > 1) {
                     $blnHouseholdOkay = false;
                 }
             }
         }
     }
     if (!$blnHouseholdOkay) {
         $this->strTemplate = dirname(__FILE__) . '/Vicp_Merge_Fields_Invalid.tpl.php';
         return;
     }
     if ($this->objPerson->PublicLogin && $this->objPersonMergeWith->PublicLogin) {
         $this->strTemplate = dirname(__FILE__) . '/Vicp_Merge_Fields_InvalidPublicLogin.tpl.php';
         return;
     }
     $this->btnLeft = new QButton($this);
     $this->btnLeft->CssClass = 'primary';
     $this->btnLeft->Text = 'Use This';
     $this->btnLeft->AddAction(new QClickEvent(), new QConfirmAction('You are about to PERMANENTLY merge two records together.  This cannot be undone.\\r\\nAre you SURE you wish to proceed?'));
     $this->btnLeft->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnLeft_Click'));
     $this->btnRight = new QButton($this);
     $this->btnRight->CssClass = 'primary';
     $this->btnRight->Text = 'Use This';
     $this->btnRight->AddAction(new QClickEvent(), new QConfirmAction('You are about to PERMANENTLY merge two records together.  This cannot be undone.\\r\\nAre you SURE you wish to proceed?'));
     $this->btnRight->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnRight_Click'));
 }
开发者ID:alcf,项目名称:chms,代码行数:45,代码来源:Vicp_Merge_Fields.class.php

示例6: SetupPerson

 protected function SetupPerson()
 {
     // Lookup Object PK information from Query String (if applicable)
     // Set mode to Edit or New depending on what's found
     $intId = QApplication::QueryString('intId');
     if ($intId) {
         $this->objPerson = Person::Load($intId);
         if (!$this->objPerson) {
             throw new Exception('Could not find a Person object with PK arguments: ' . $intId);
         }
         $this->strTitleVerb = QApplication::Translate('Edit');
         $this->blnEditMode = true;
     } else {
         $this->objPerson = new Person();
         $this->strTitleVerb = QApplication::Translate('Create');
         $this->blnEditMode = false;
     }
 }
开发者ID:qcodo,项目名称:qcodo-api,代码行数:18,代码来源:PersonEditFormBase.class.php

示例7: UploadPackage

 /**
  * This performs the actual upload of the package's payload
  * @param string $strPackageName
  * @param string $strUsername
  * @param string $strPassword
  * @param boolean $blnGzCompress
  * @param string $strQpmXml
  * @return string
  */
 public function UploadPackage($strPackageName, $strUsername, $strPassword, $blnGzCompress, $strQpmXml)
 {
     $objPerson = Person::Load($this->Login($strUsername, $strPassword));
     $objPackage = Package::Load($this->GetPackageId($strPackageName));
     if ($blnGzCompress) {
         $strQpmXml = gzuncompress($strQpmXml);
     }
     try {
         $objContribution = $objPackage->PostContributionVersion($objPerson, $strQpmXml, null);
     } catch (Exception $objExc) {
         return 'a server exception was thrown by the qpm webservice: ' . $objExc->getMessage();
     }
     if ($objContribution) {
         $objPackage->PostMessage('A new version of this package was uploaded by ' . $objPerson->DisplayName, null, null);
         return sprintf('package %s/%s uploaded successfully', $objPerson->Username, $objPackage->Token);
     } else {
         return 'an unknown error has occurred, package not uploaded';
     }
 }
开发者ID:klucznik,项目名称:qcodo-website,代码行数:28,代码来源:1_0.php

示例8: Form_Create

 protected function Form_Create()
 {
     $this->objPerson = Person::Load(QApplication::PathInfo(0));
     if (!$this->objPerson) {
         QApplication::Redirect('/');
     }
     if (!$this->objPerson->IsIndividual()) {
         QApplication::Redirect('/');
     }
     $this->strPageTitle .= $this->objPerson->Name;
     $this->pnlContent = new EditHouseholdHomeAddressPanel($this);
     $this->pnlContent->objDelegate = new EditHomeAddressDelegate($this->pnlContent, $this->objPerson->LinkUrl, null);
     $this->pnlContent->btnSave->AddAction(new QClickEvent(), new QShowDialogBox($this->pnlContent->objDelegate->dlgMessage));
     $this->pnlContent->btnSave->AddAction(new QClickEvent(), new QAjaxAction('btnSave_Click'));
     // Copy over home phone number
     foreach ($this->objPerson->GetPhoneArray() as $objPhone) {
         if ($objPhone->PhoneTypeId == PhoneType::Home) {
             $this->pnlContent->objDelegate->arrPhones[0]->Number = $objPhone->Number;
         }
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:21,代码来源:new.php

示例9: SetupPanel

 protected function SetupPanel()
 {
     // Ensure Permission - figure if they can modify the email address they can modify the co-primary.
     if (!$this->objPerson->IsLoginCanEditEmailAddress(QApplication::$Login)) {
         return $this->ReturnTo('#contact');
     }
     $this->pnlPerson = new SelectPersonPanel($this);
     $this->pnlPerson->Name = 'Co-Primary';
     $this->pnlPerson->AllowCreate = true;
     $this->pnlPerson->Required = true;
     // Initialize
     if ($this->objPerson->CoPrimary) {
         $objCoPrimary = Person::Load($this->objPerson->CoPrimary);
         if ($objCoPrimary) {
             $this->pnlPerson->txtName->Text = sprintf("%s %s", $objCoPrimary->FirstName, $objCoPrimary->LastName);
         }
     }
     $this->btnSave->Text = 'Update';
     $this->btnDelete = new QLinkButton($this);
     $this->btnDelete->Text = 'Delete';
     $this->btnDelete->CssClass = 'delete';
 }
开发者ID:alcf,项目名称:chms,代码行数:22,代码来源:Vicp_ContactInformation_EditCoprimary.class.php

示例10: SaveEmail

 /**
  * This will save this object's Email instance,
  * updating only the fields which have had a control created for it.
  */
 public function SaveEmail()
 {
     try {
         // Update any fields for controls that have been created
         if ($this->lstPerson) {
             $this->objEmail->PersonId = $this->lstPerson->SelectedValue;
         }
         if ($this->txtAddress) {
             $this->objEmail->Address = $this->txtAddress->Text;
         }
         // Update any UniqueReverseReferences (if any) for controls that have been created for it
         if ($this->lstPersonAsPrimary) {
             $this->objEmail->PersonAsPrimary = Person::Load($this->lstPersonAsPrimary->SelectedValue);
         }
         // Save the Email object
         $this->objEmail->Save();
         // Finally, update any ManyToManyReferences (if any)
     } catch (QCallerException $objExc) {
         $objExc->IncrementOffset();
         throw $objExc;
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:26,代码来源:EmailMetaControlGen.class.php

示例11: __get

 /**
  * 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 'SignupFormId':
             // Gets the value for intSignupFormId (Not Null)
             // @return integer
             return $this->intSignupFormId;
         case 'PersonId':
             // Gets the value for intPersonId
             // @return integer
             return $this->intPersonId;
         case 'SignupByPersonId':
             // Gets the value for intSignupByPersonId
             // @return integer
             return $this->intSignupByPersonId;
         case 'SignupEntryStatusTypeId':
             // Gets the value for intSignupEntryStatusTypeId (Not Null)
             // @return integer
             return $this->intSignupEntryStatusTypeId;
         case 'DateCreated':
             // Gets the value for dttDateCreated (Not Null)
             // @return QDateTime
             return $this->dttDateCreated;
         case 'DateSubmitted':
             // Gets the value for dttDateSubmitted
             // @return QDateTime
             return $this->dttDateSubmitted;
         case 'AmountTotal':
             // Gets the value for fltAmountTotal
             // @return double
             return $this->fltAmountTotal;
         case 'AmountPaid':
             // Gets the value for fltAmountPaid
             // @return double
             return $this->fltAmountPaid;
         case 'AmountBalance':
             // Gets the value for fltAmountBalance
             // @return double
             return $this->fltAmountBalance;
         case 'InternalNotes':
             // Gets the value for strInternalNotes
             // @return string
             return $this->strInternalNotes;
         case 'CommunicationsEntryId':
             // Gets the value for intCommunicationsEntryId
             // @return integer
             return $this->intCommunicationsEntryId;
             ///////////////////
             // Member Objects
             ///////////////////
         ///////////////////
         // Member Objects
         ///////////////////
         case 'SignupForm':
             // Gets the value for the SignupForm object referenced by intSignupFormId (Not Null)
             // @return SignupForm
             try {
                 if (!$this->objSignupForm && !is_null($this->intSignupFormId)) {
                     $this->objSignupForm = SignupForm::Load($this->intSignupFormId);
                 }
                 return $this->objSignupForm;
             } 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;
             }
         case 'SignupByPerson':
             // Gets the value for the Person object referenced by intSignupByPersonId
             // @return Person
             try {
                 if (!$this->objSignupByPerson && !is_null($this->intSignupByPersonId)) {
                     $this->objSignupByPerson = Person::Load($this->intSignupByPersonId);
                 }
                 return $this->objSignupByPerson;
             } catch (QCallerException $objExc) {
//.........这里部分代码省略.........
开发者ID:alcf,项目名称:chms,代码行数:101,代码来源:SignupEntryGen.class.php

示例12:

            case 'daughter':
                $intRelationshipTypeId = RelationshipType::Child;
                break;
            case 'brother':
            case 'sister':
                $intRelationshipTypeId = RelationshipType::Sibling;
                break;
            case 'grandmother':
            case 'grandfather':
                $intRelationshipTypeId = RelationshipType::Grandparent;
                break;
            case 'grandchild':
            case 'grandson':
            case 'granddaughter':
                $intRelationshipTypeId = RelationshipType::Grandchild;
                break;
        }
        if ($intRelationshipTypeId) {
            $objPerson = Person::Load($intPersonIdByIndvId[$objRow['indvid']]);
            $objRelatedPerson = Person::Load($intPersonIdByIndvId[$objRow['reltindvid']]);
            if (!Relationship::LoadByPersonIdRelatedToPersonId($objPerson->Id, $objRelatedPerson->Id)) {
                $objPerson->AddRelationship($objRelatedPerson, $intRelationshipTypeId);
            }
        }
    }
}
$objParticipationCursor = HouseholdParticipation::QueryCursor(QQ::All());
$intCount = HouseholdParticipation::CountAll();
while (QDataGen::DisplayWhileTask('Recalculating HouseholdParticipation Roles', $intCount) && ($objHouseholdParticipation = HouseholdParticipation::InstantiateCursor($objParticipationCursor))) {
    $objHouseholdParticipation->RefreshRole();
}
开发者ID:alcf,项目名称:chms,代码行数:31,代码来源:acs-relationships.cli.php

示例13: chkSelected_Click

 protected function chkSelected_Click($strFormId, $strControlId, $strParameter)
 {
     // We look to the Parameter for the ID of the person being checked
     $intPersonId = $strParameter;
     // Let's get the selected person
     $objPerson = Person::Load($intPersonId);
     // Let's respond to the user what just happened
     if ($this->GetControl($strControlId)->Checked) {
         $strResponse = QApplication::HtmlEntities('You just selected ' . $objPerson->FirstName . ' ' . $objPerson->LastName . '.');
     } else {
         $strResponse = QApplication::HtmlEntities('You just deselected ' . $objPerson->FirstName . ' ' . $objPerson->LastName . '.');
     }
     $strResponse .= '<br/>';
     // Now, let's go through all the checkboxes and list everyone who has been selected
     $strNameArray = array();
     foreach ($this->GetAllControls() as $objControl) {
         if (substr($objControl->ControlId, 0, 11) == 'chkSelected') {
             if ($objControl->Checked) {
                 $objPerson = Person::Load($objControl->ActionParameter);
                 $strName = QApplication::HtmlEntities($objPerson->FirstName . ' ' . $objPerson->LastName);
                 array_push($strNameArray, $strName);
             }
         }
     }
     $strResponse .= 'The list of people who are currently selected: ' . implode(', ', $strNameArray);
     // Provide feedback to the user by updating the Response label
     $this->lblResponse->Text = $strResponse;
 }
开发者ID:kmcelhinney,项目名称:qcodo,代码行数:28,代码来源:select.php

示例14: pxySelectPerson_Click

 public function pxySelectPerson_Click($strFormId, $strControlId, $strParameter)
 {
     if ($strFormId) {
         $this->blnExplicitSelectionFlag = true;
     }
     $this->objSelectedPerson = Person::Load($strParameter);
     $this->pnlPerson_Refresh();
     $this->dtgPeople->Refresh();
 }
开发者ID:alcf,项目名称:chms,代码行数:9,代码来源:StewardshipSelectPersonDialogBox.class.php

示例15: QueueMessages

 public function QueueMessages()
 {
     if ($this->Group) {
         foreach ($this->Group->GetActiveGroupParticipationArray() as $objParticipation) {
             $objPerson = $objParticipation->Person;
             EmailOutgoingQueue::QueueMessage($this->EmailMessage, $this->Group->Token, $objPerson);
             // GJS: At this point, also check if there is a co-primary and include them to the list
             if ($objPerson->DateOfBirth && $objPerson->CoPrimary) {
                 $objCoPrimary = Person::Load($objPerson->CoPrimary);
                 if ($objCoPrimary) {
                     EmailOutgoingQueue::QueueMessage($this->EmailMessage, $this->Group->Token, $objCoPrimary);
                 }
             }
         }
         foreach ($this->Group->Ministry->GetLoginArray() as $objLogin) {
             if ($objLogin->DomainActiveFlag && $objLogin->LoginActiveFlag) {
                 EmailOutgoingQueue::QueueMessage($this->EmailMessage, $this->Group->Token, $objLogin);
             }
         }
     } else {
         if ($this->CommunicationList) {
             foreach ($this->CommunicationList->GetPersonArray() as $objPerson) {
                 EmailOutgoingQueue::QueueMessage($this->EmailMessage, $this->CommunicationList->Token, $objPerson);
             }
             foreach ($this->CommunicationList->GetCommunicationListEntryArray() as $objCommunicationListEntry) {
                 EmailOutgoingQueue::QueueMessage($this->EmailMessage, $this->CommunicationList->Token, $objCommunicationListEntry);
             }
             foreach ($this->CommunicationList->Ministry->GetLoginArray() as $objLogin) {
                 if ($objLogin->DomainActiveFlag && $objLogin->LoginActiveFlag) {
                     EmailOutgoingQueue::QueueMessage($this->EmailMessage, $this->CommunicationList->Token, $objLogin);
                 }
             }
         }
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:35,代码来源:EmailMessageRoute.class.php


注:本文中的Person::Load方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。