function canEditData() { $oCurrentMember = Member::CurrentMember(); $iCurrentMemberID = $oCurrentMember->ID; $iDataSheetID = $this->ID; if ($iCurrentMemberID && ($oDataSheetID = DataObject::get('DataSheet', "ID = '{$iDataSheetID}' AND MemberID = '{$iCurrentMemberID}'"))) { return true; } }
function OrderStepField() { return new OrderStepField($name = "MyOrderStep", $this, Member::CurrentMember()); }
/** * 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; } }
function unsubscribe() { $member = Member::CurrentMember(); if(!$member) return false; $this->dataRecord->Subscribers()->remove($member); Director::redirectBack(); return; }
/** * Returns the current member * @return NULL | Member */ function AccountMember() { return Member::CurrentMember(); }
public function MyDataSheets() { $oCurrentMember = Member::CurrentMember(); $iCurrentMemberID = $oCurrentMember->ID; if ($iCurrentMemberID && ($oDataSheets = DataObject::get('DataSheet', "MemberID = '{$iCurrentMemberID}'"))) { return $oDataSheets; } }