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


PHP QQN::GroupParticipation方法代码示例

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


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

示例1: __construct

 public function __construct(QPanel $pnlContent, $strReturnUrl)
 {
     $this->pnlContent = $pnlContent;
     $this->pnlContent->Template = dirname(__FILE__) . '/EditGroupParticipationDelegate.tpl.php';
     // Throw Exception if Group Cannot have Explicitly Defined Participants
     if (!$this->pnlContent->objGroup->IsGroupCanHaveExplicitlyDefinedParticipants()) {
         throw new Exception('Group Cannot have Explicitly Defined Participants');
     }
     $this->strReturnUrl = $strReturnUrl;
     $this->objParticipationArray = GroupParticipation::LoadArrayByPersonIdGroupId($this->pnlContent->objPerson->Id, $this->pnlContent->objGroup->Id, QQ::OrderBy(QQN::GroupParticipation()->GroupRole->Name, QQN::GroupParticipation()->DateStart), QQ::Clause(QQ::Expand(QQN::GroupParticipation()->GroupRole)));
     $this->chkIsAuthorizedSender = new QCheckBox($this->pnlContent);
     $this->chkIsAuthorizedSender->Name = '  Is Authorized Sender';
     if (GroupAuthorizedSender::LoadByGroupIdPersonId($this->pnlContent->objGroup->Id, $this->pnlContent->objPerson->Id)) {
         $this->chkIsAuthorizedSender->Checked = true;
     } else {
         $this->chkIsAuthorizedSender->Checked = false;
     }
     $this->lblCurrentRoles = new QLabel($this->pnlContent);
     $this->lblCurrentRoles->Name = 'Current Roles';
     $this->lblCurrentRoles->HtmlEntities = false;
     $this->lblCurrentRoles_Refresh();
     $this->dtgParticipations = new QDataGrid($this->pnlContent);
     $this->dtgParticipations->AddColumn(new QDataGridColumn('Role', '<?= $_CONTROL->ParentControl->objDelegate->RenderRole($_ITEM); ?>', 'HtmlEntities=false', 'Width=100px'));
     $this->dtgParticipations->AddColumn(new QDataGridColumn('Participation Started', '<?= $_CONTROL->ParentControl->objDelegate->RenderDateStart($_ITEM); ?>', 'HtmlEntities=false', 'Width=150px'));
     $this->dtgParticipations->AddColumn(new QDataGridColumn('Participation Ended', '<?= $_CONTROL->ParentControl->objDelegate->RenderDateEnd($_ITEM); ?>', 'HtmlEntities=false', 'Width=150px'));
     $this->dtgParticipations->SetDataBinder('dtgParticipations_Bind', $this);
     $this->pxyEdit = new QControlProxy($this->pnlContent);
     $this->pxyEdit->AddAction(new QClickEvent(), new QAjaxControlAction($this->pnlContent, 'pxyEdit_Click'));
     $this->pxyEdit->AddAction(new QClickEvent(), new QTerminateAction());
     $this->dlgEdit_Setup();
 }
开发者ID:alcf,项目名称:chms,代码行数:31,代码来源:EditGroupParticipationDelegate.class.php

示例2: GetParticipationDatesArrayForPersonIdGroupIdGroupRoleId

 /**
  * Retrieves an array of array of dates (which can be used for IsValidDates for a given
  * Person, Group and GroupRole
  * 
  * @param integer $intPersonId
  * @param integer $intGroupId
  * @param integer $intGroupRoleId
  * @return QDateTime[][]
  */
 public static function GetParticipationDatesArrayForPersonIdGroupIdGroupRoleId($intPersonId, $intGroupId, $intGroupRoleId)
 {
     $objParticipationArray = GroupParticipation::QueryArray(QQ::AndCondition(QQ::Equal(QQN::GroupParticipation()->PersonId, $intPersonId), QQ::Equal(QQN::GroupParticipation()->GroupId, $intGroupId), QQ::Equal(QQN::GroupParticipation()->GroupRoleId, $intGroupRoleId)), QQ::OrderBy(QQN::GroupParticipation()->DateStart));
     $dttArrayToReturn = array();
     foreach ($objParticipationArray as $objParticipation) {
         $dttArrayToReturn[] = array($objParticipation->DateStart, $objParticipation->DateEnd);
     }
     return $dttArrayToReturn;
 }
开发者ID:alcf,项目名称:chms,代码行数:18,代码来源:GroupParticipation.class.php

示例3: RenderGroupRoles

 public function RenderGroupRoles(Group $objGroup)
 {
     $this->objParticipationArray = GroupParticipation::LoadArrayByPersonIdGroupId($this->objPerson->Id, $objGroup->Id, QQ::OrderBy(QQN::GroupParticipation()->GroupRole->Name, QQN::GroupParticipation()->DateStart));
     $strCurrentRole = null;
     $strArray = array();
     foreach ($this->objParticipationArray as $objParticipation) {
         if ($strCurrentRole != $objParticipation->GroupRole->Name) {
             $strCurrentRole = $objParticipation->GroupRole->Name;
             $strArray[] = QApplication::HtmlEntities($strCurrentRole);
         } else {
             $strArray[] = '&nbsp;';
         }
     }
     return implode('<br/>', $strArray);
 }
开发者ID:alcf,项目名称:chms,代码行数:15,代码来源:Vicp_Groups.class.php

示例4: ResolveContentItem

 /**
  * Used internally by the Meta-based Add Column tools.
  *
  * Given a QQNode or a Text String, this will return a GroupParticipation-based QQNode.
  * It will also verify that it is a proper GroupParticipation-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_participation') {
             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_participation".');
         }
     } else {
         if (is_string($mixContent)) {
             switch ($mixContent) {
                 case 'Id':
                     return QQN::GroupParticipation()->Id;
                 case 'PersonId':
                     return QQN::GroupParticipation()->PersonId;
                 case 'Person':
                     return QQN::GroupParticipation()->Person;
                 case 'GroupId':
                     return QQN::GroupParticipation()->GroupId;
                 case 'Group':
                     return QQN::GroupParticipation()->Group;
                 case 'GroupRoleId':
                     return QQN::GroupParticipation()->GroupRoleId;
                 case 'GroupRole':
                     return QQN::GroupParticipation()->GroupRole;
                 case 'DateStart':
                     return QQN::GroupParticipation()->DateStart;
                 case 'DateEnd':
                     return QQN::GroupParticipation()->DateEnd;
                 case 'Status':
                     return QQN::GroupParticipation()->Status;
                 case 'DateFollowup':
                     return QQN::GroupParticipation()->DateFollowup;
                 default:
                     throw new QCallerException('Simple Property not found in GroupParticipationDataGrid 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,代码行数:69,代码来源:GroupParticipationDataGridGen.class.php

示例5: GetActiveGroupParticipationArray

 /**
  * Gets all associated ACTIVE GroupParticipations as an array of GroupParticipation objects
  * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
  * @return GroupParticipation[]
  */
 public function GetActiveGroupParticipationArray($objOptionalClauses = null)
 {
     if (is_null($this->intId)) {
         return array();
     }
     try {
         return GroupParticipation::QueryArray(QQ::AndCondition(QQ::Equal(QQN::GroupParticipation()->GroupId, $this->intId), QQ::OrCondition(QQ::IsNull(QQN::GroupParticipation()->DateEnd), QQ::GreaterThan(QQN::GroupParticipation()->DateEnd, QDateTime::Now()))), $objOptionalClauses);
     } catch (QCallerException $objExc) {
         $objExc->IncrementOffset();
         throw $objExc;
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:17,代码来源:Group.class.php

示例6: RenderCurrentGroups

 public function RenderCurrentGroups(Person $objPerson)
 {
     $this->objParticipations = GroupParticipation::QueryArray(QQ::AndCondition(QQ::Equal(QQN::GroupParticipation()->PersonId, $objPerson->Id), QQ::IsNull(QQN::GroupParticipation()->DateEnd), QQ::In(QQN::GroupParticipation()->GroupId, $this->intGroupIdArray)), QQ::Clause(QQ::OrderBy(QQN::GroupParticipation()->Group->Name), QQ::Expand(QQN::GroupParticipation()->Group->Name)));
     $strArray = array();
     foreach ($this->objParticipations as $objParticipation) {
         $strArray[] = $objParticipation->Group->Name;
     }
     if (count($strArray)) {
         return implode(' and ', $strArray);
     } else {
         return '<span style="font-size: 10px; color: #999;">No current groups</span>';
     }
 }
开发者ID:alcf,项目名称:chms,代码行数:13,代码来源:CpGroup_Base.class.php

示例7: CountByDateFollowup

 /**
  * Count GroupParticipations
  * by DateFollowup Index(es)
  * @param QDateTime $dttDateFollowup
  * @return int
  */
 public static function CountByDateFollowup($dttDateFollowup, $objOptionalClauses = null)
 {
     // Call GroupParticipation::QueryCount to perform the CountByDateFollowup query
     return GroupParticipation::QueryCount(QQ::Equal(QQN::GroupParticipation()->DateFollowup, $dttDateFollowup), $objOptionalClauses);
 }
开发者ID:alcf,项目名称:chms,代码行数:11,代码来源:GroupParticipationGen.class.php


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