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


PHP Member::CurrentMember方法代码示例

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


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

示例1: canEditData

 function canEditData()
 {
     $oCurrentMember = Member::CurrentMember();
     $iCurrentMemberID = $oCurrentMember->ID;
     $iDataSheetID = $this->ID;
     if ($iCurrentMemberID && ($oDataSheetID = DataObject::get('DataSheet', "ID = '{$iDataSheetID}' AND MemberID = '{$iCurrentMemberID}'"))) {
         return true;
     }
 }
开发者ID:SustainableCoastlines,项目名称:loveyourwater,代码行数:9,代码来源:DataSheet.php

示例2: OrderStepField

 function OrderStepField()
 {
     return new OrderStepField($name = "MyOrderStep", $this, Member::CurrentMember());
 }
开发者ID:nieku,项目名称:silverstripe-ecommerce,代码行数:4,代码来源:Order.php

示例3: mapCleanUps

 /**
  * Map regions to an array
  * 
  * @return mixed An array of regions, or false 
  */
 function mapCleanUps()
 {
     // Get Member
     $oCurrentMember = Member::CurrentMember();
     $oCurrentMemberID = $oCurrentMember->ID;
     $oCleanUpGroups = DataObject::get('CleanUpGroup', "CreatorID = '{$oCurrentMemberID}'");
     // If there are CleanUpGroups
     if ($oCleanUpGroups) {
         // Set a return array
         $aReturn = array();
         // Loop through the CleanUpGroups
         foreach ($oCleanUpGroups as $oCleanUpGroup) {
             // Add the value, title, and class items
             $aReturn[$oCleanUpGroup->ID] = $oCleanUpGroup->Title;
         }
         // Return the array
         return $aReturn;
     } else {
         return false;
     }
 }
开发者ID:SustainableCoastlines,项目名称:loveyourwater,代码行数:26,代码来源:EventFilterForm.php

示例4: unsubscribe

	function unsubscribe() {
		$member = Member::CurrentMember();
		if(!$member) return false;
		$this->dataRecord->Subscribers()->remove($member);
		Director::redirectBack();
		return;
	}
开发者ID:neopba,项目名称:silverstripe-book,代码行数:7,代码来源:JobCategory.php

示例5: AccountMember

 /**
  * Returns the current member
  * @return NULL | Member
  */
 function AccountMember()
 {
     return Member::CurrentMember();
 }
开发者ID:nieku,项目名称:silverstripe-ecommerce,代码行数:8,代码来源:AccountPage.php

示例6: MyDataSheets

 public function MyDataSheets()
 {
     $oCurrentMember = Member::CurrentMember();
     $iCurrentMemberID = $oCurrentMember->ID;
     if ($iCurrentMemberID && ($oDataSheets = DataObject::get('DataSheet', "MemberID = '{$iCurrentMemberID}'"))) {
         return $oDataSheets;
     }
 }
开发者ID:SustainableCoastlines,项目名称:loveyourwater,代码行数:8,代码来源:DataEntryPage.php


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