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


PHP QQN::Group方法代码示例

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


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

示例1: dtgGroups_Bind

 public function dtgGroups_Bind()
 {
     if ($this->chkViewAll->Checked) {
         $objClause = QQ::AndCondition(QQ::Equal(QQN::Group()->GroupParticipation->PersonId, $this->objPerson->Id), QQ::In(QQN::Group()->GroupTypeId, array(GroupType::RegularGroup, GroupType::GrowthGroup)));
     } else {
         $objClause = QQ::AndCondition(QQ::Equal(QQN::Group()->GroupParticipation->PersonId, $this->objPerson->Id), QQ::IsNull(QQN::Group()->GroupParticipation->DateEnd), QQ::In(QQN::Group()->GroupTypeId, array(GroupType::RegularGroup, GroupType::GrowthGroup)));
     }
     // Admins can view anything
     if (QApplication::$Login->RoleTypeId == RoleType::ChMSAdministrator) {
     } else {
         // Non-Admins can only view non-confidential groups
         // OR groups that they are associated with
         $intMinistryIdArray = array();
         foreach (QApplication::$Login->GetMinistryArray() as $objMinistry) {
             $intMinistryIdArray[] = $objMinistry->Id;
         }
         $objSubClause = QQ::OrCondition(QQ::Equal(QQN::Group()->ConfidentialFlag, false), QQ::In(QQN::Group()->MinistryId, $intMinistryIdArray));
         $objClause = QQ::AndCondition($objClause, $objSubClause);
     }
     $this->dtgGroups->DataSource = Group::QueryArray($objClause, QQ::Distinct());
 }
开发者ID:alcf,项目名称:chms,代码行数:21,代码来源:Vicp_Groups.class.php

示例2: Form_Create


//.........这里部分代码省略.........
     if ($this->lstAfterMonth->SelectedValue && $this->lstAfterYear->SelectedValue && $this->lstBeforeMonth->SelectedValue && $this->lstBeforeYear->SelectedValue) {
         $this->startDate = new QDateTime($this->lstAfterMonth->SelectedIndex + 1 . '/1/' . $this->lstAfterYear->SelectedValue);
         $this->endDate = new QDateTime($this->lstBeforeMonth->SelectedIndex + 1 . '/1/' . $this->lstBeforeYear->SelectedValue);
         // Initialize output values
         $this->objPersonArray = array();
         $this->monthCount = array();
         $this->tempDate = new QDateTime($this->lstAfterMonth->SelectedIndex + 1 . '/1/' . $this->lstAfterYear->SelectedValue);
         while ($this->tempDate->IsEarlierOrEqualTo($this->endDate)) {
             $this->monthCount[$this->tempDate->__toString('MMM YYYY')] = 0;
             $this->objPersonArray[$this->tempDate->__toString('MMM YYYY')] = array();
             $this->tempDate->AddMonths(1);
         }
         // Figure out which groups to search first.
         /*
         +----+------------------+----------------------------+
         | id | token            | name                       |
         +----+------------------+----------------------------+
         |  1 | bc               | Biblical Counseling        |
         |  2 | hr               | HR                         |
         |  3 | appurch          | AP/Purchasing              |
         |  4 | busops           | Business Operations        |
         |  5 | finance          | Finance                    |
         |  6 | officemanagement | Office Management          |
         |  7 | et               | ETM                        |
         |  8 | evangoutreach    | Evangelism and Outreach    |
         |  9 | events           | Events                     |
         | 10 | family           | Family Ministry            |
         | 11 | ibs              | IBS                        |
         | 12 | music            | Music                      |
         | 13 | pp               | Pastor Paul                |
         | 14 | volunteers       | Volunteers                 |
         | 15 | worshiparts      | Worship Arts               |
         | 16 | facilities       | Facilities                 |
         | 17 | growth           | Growth Groups              |
         | 18 | it               | IT                         |
         | 19 | mc               | Member Care                |
         | 20 | mit              | Ministry Involvement       |
         | 21 | prayer           | Prayer and Visitation      |
         | 22 | safari           | Safari Kids                |
         | 23 | services         | Worship Service Ministries |
         | 24 | videoprod        | Video Production           |
         | 25 | website          | Website                    |
         | 26 | sp               | Strategic Partnerships     |
         | 27 | comm             | Communications             |
         | 28 | sm               | Student Ministries         |
         | 29 | payroll          | Payroll                    |
         | 30 | mens             | Men's Fellowship           |
         | 31 | yam              | Young Adult Ministry       |
         | 32 | donations        | Donations and Resources    |
         | 33 | womens           | Women's Ministry           |
         | 34 | gmt              | Global Ministry Team       |
         | 35 | pastors          | Pastoral Board             |
         | 36 | recovery         | Recovery                   |
         | 37 | singles          | Singles                    |
         | 38 | seniors          | Seniors                    |
         | 39 | minops           | Ministry Operations        |
         | 40 | stewardship      | Stewardship                |
         +----+------------------+----------------------------+-
         */
         $objGroupCursor = Group::QueryCursor(QQ::In(QQN::Group()->GroupTypeId, array(GroupType::RegularGroup, GroupType::GrowthGroup)));
         while ($objGroup = Group::InstantiateCursor($objGroupCursor)) {
             switch (QApplication::PathInfo(2)) {
                 case 'All':
                     // increment all the appropriate arrays
                     $this->calculateValues($objGroup);
                     break;
开发者ID:alcf,项目名称:chms,代码行数:67,代码来源:volunteers.php

示例3: LoadArrayByManagedByLogin

 /**
  * Retrieves a list of Groups that can be managed by a given login
  * @param Login $objLogin
  * @return Group[]
  */
 public static function LoadArrayByManagedByLogin(Login $objLogin)
 {
     if ($objLogin->RoleTypeId == RoleType::ChMSAdministrator) {
         $intMinistryIdArray = array();
         foreach (Ministry::LoadArrayByActiveFlag(true) as $objMinistry) {
             $intMinistryIdArray[] = $objMinistry->Id;
         }
     } else {
         $intMinistryIdArray = array();
         foreach ($objLogin->GetMinistryArray() as $objMinistry) {
             $intMinistryIdArray[] = $objMinistry->Id;
         }
     }
     return Group::QueryArray(QQ::AndCondition(QQ::Equal(QQN::Group()->GroupTypeId, GroupType::RegularGroup), QQ::In(QQN::Group()->MinistryId, $intMinistryIdArray), QQ::Equal(QQN::Group()->ActiveFlag, true)), QQ::OrderBy(QQN::Group()->Name));
 }
开发者ID:alcf,项目名称:chms,代码行数:20,代码来源:Group.class.php

示例4: ResolveContentItem

 /**
  * Used internally by the Meta-based Add Column tools.
  *
  * Given a QQNode or a Text String, this will return a Group-based QQNode.
  * It will also verify that it is a proper Group-based QQNode, and will throw an exception otherwise.
  *
  * @param mixed $mixContent
  * @return QQNode
  */
 protected function ResolveContentItem($mixContent)
 {
     if ($mixContent instanceof QQNode) {
         if (!$mixContent->_ParentNode) {
             throw new QCallerException('Content QQNode cannot be a Top Level Node');
         }
         if ($mixContent->_RootTableName == 'group') {
             if ($mixContent instanceof QQReverseReferenceNode && !$mixContent->_PropertyName) {
                 throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
             }
             $objCurrentNode = $mixContent;
             while ($objCurrentNode = $objCurrentNode->_ParentNode) {
                 if (!$objCurrentNode instanceof QQNode) {
                     throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
                 }
                 if ($objCurrentNode instanceof QQReverseReferenceNode && !$objCurrentNode->_PropertyName) {
                     throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
                 }
             }
             return $mixContent;
         } else {
             throw new QCallerException('Content QQNode has a root table of "' . $mixContent->_RootTableName . '". Must be a root of "group".');
         }
     } else {
         if (is_string($mixContent)) {
             switch ($mixContent) {
                 case 'Id':
                     return QQN::Group()->Id;
                 case 'GroupTypeId':
                     return QQN::Group()->GroupTypeId;
                 case 'MinistryId':
                     return QQN::Group()->MinistryId;
                 case 'Ministry':
                     return QQN::Group()->Ministry;
                 case 'Name':
                     return QQN::Group()->Name;
                 case 'Description':
                     return QQN::Group()->Description;
                 case 'ParentGroupId':
                     return QQN::Group()->ParentGroupId;
                 case 'ParentGroup':
                     return QQN::Group()->ParentGroup;
                 case 'HierarchyLevel':
                     return QQN::Group()->HierarchyLevel;
                 case 'HierarchyOrderNumber':
                     return QQN::Group()->HierarchyOrderNumber;
                 case 'ConfidentialFlag':
                     return QQN::Group()->ConfidentialFlag;
                 case 'EmailBroadcastTypeId':
                     return QQN::Group()->EmailBroadcastTypeId;
                 case 'Token':
                     return QQN::Group()->Token;
                 case 'ActiveFlag':
                     return QQN::Group()->ActiveFlag;
                 case 'Status':
                     return QQN::Group()->Status;
                 case 'StatusObject':
                     return QQN::Group()->StatusObject;
                 case 'GroupCategory':
                     return QQN::Group()->GroupCategory;
                 case 'GrowthGroup':
                     return QQN::Group()->GrowthGroup;
                 case 'SmartGroup':
                     return QQN::Group()->SmartGroup;
                 default:
                     throw new QCallerException('Simple Property not found in GroupDataGrid content: ' . $mixContent);
             }
         } else {
             if ($mixContent instanceof QQAssociationNode) {
                 throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
             } else {
                 throw new QCallerException('Invalid Content type');
             }
         }
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:85,代码来源:GroupDataGridGen.class.php

示例5: array

| 28 | sm               | Student Ministries         |
| 29 | payroll          | Payroll                    |
| 30 | mens             | Men's Fellowship           |
| 31 | yam              | Young Adult Ministry       |
| 32 | donations        | Donations and Resources    |
| 33 | womens           | Women's Ministry           |
| 34 | gmt              | Global Ministry Team       |
| 35 | pastors          | Pastoral Board             |
| 36 | recovery         | Recovery                   |
| 37 | singles          | Singles                    |
| 38 | seniors          | Seniors                    |
| 39 | minops           | Ministry Operations        |
| 40 | stewardship      | Stewardship                |
+----+------------------+----------------------------+-
*/
$objGroupCursor = Group::QueryCursor(QQ::In(QQN::Group()->GroupTypeId, array(GroupType::RegularGroup, GroupType::GrowthGroup)));
while ($objGroup = Group::InstantiateCursor($objGroupCursor)) {
    switch ($ministrydepartment) {
        case 'All':
            // increment all the appropriate arrays
            calculateValues($objGroup);
            break;
        case 'OutreachEvangelismCare':
            // Biblical Counseling, Evangelism and Outreach, Global Ministry Team, Prayer and Visitation, Recovery, Strategic Partnerships
            if ($objGroup->MinistryId == 1 || $objGroup->MinistryId == 8 || $objGroup->MinistryId == 34 || $objGroup->MinistryId == 21 || $objGroup->MinistryId == 36 || $objGroup->MinistryId == 26) {
                calculateValues($objGroup);
            }
            break;
        case 'AdministrativeOperations':
            // Communications, IT, Stewardship
            if ($objGroup->MinistryId == 27 || $objGroup->MinistryId == 18 || $objGroup->MinistryId == 40) {
开发者ID:alcf,项目名称:chms,代码行数:31,代码来源:export_volunteer_to_excel.php

示例6: CountByStatus

 /**
  * Count Groups
  * by Status Index(es)
  * @param integer $intStatus
  * @return int
  */
 public static function CountByStatus($intStatus, $objOptionalClauses = null)
 {
     // Call Group::QueryCount to perform the CountByStatus query
     return Group::QueryCount(QQ::Equal(QQN::Group()->Status, $intStatus), $objOptionalClauses);
 }
开发者ID:alcf,项目名称:chms,代码行数:11,代码来源:GroupGen.class.php


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