本文整理汇总了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;
}
}
示例2: OrderStepField
function OrderStepField()
{
return new OrderStepField($name = "MyOrderStep", $this, Member::CurrentMember());
}
示例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;
}
}
示例4: unsubscribe
function unsubscribe() {
$member = Member::CurrentMember();
if(!$member) return false;
$this->dataRecord->Subscribers()->remove($member);
Director::redirectBack();
return;
}
示例5: AccountMember
/**
* Returns the current member
* @return NULL | Member
*/
function AccountMember()
{
return Member::CurrentMember();
}
示例6: MyDataSheets
public function MyDataSheets()
{
$oCurrentMember = Member::CurrentMember();
$iCurrentMemberID = $oCurrentMember->ID;
if ($iCurrentMemberID && ($oDataSheets = DataObject::get('DataSheet', "MemberID = '{$iCurrentMemberID}'"))) {
return $oDataSheets;
}
}