public static function handleRecordRequest(ActiveRecord $Endpoint, $action = false) { switch ($action ? $action : ($action = static::shiftPath())) { case 'rewrites': return static::handleRewritesRequest($Endpoint); default: return parent::handleRecordRequest($Endpoint, $action); } }
public static function handleRecordRequest(ActiveRecord $Tag, $action = false) { switch ($action ? $action : ($action = static::shiftPath())) { case 'items': return static::handleTagItemsRequest($Tag); default: return parent::handleRecordRequest($Tag, $action); } }
public static function handleRecordRequest(\ActiveRecord $Competency, $action = false) { switch ($action ? $action : ($action = static::shiftPath())) { case 'demonstrations': return static::handleDemonstrationsRequest($Competency); default: return parent::handleRecordRequest($Competency, $action); } }
public static function handleRecordRequest(\ActiveRecord $ContentArea, $action = false) { switch ($action ? $action : ($action = static::shiftPath())) { case 'competencies': return static::handleCompetenciesRequest($ContentArea); case 'recent-progress': return static::handleRecentProgressRequest($ContentArea, $action); default: return parent::handleRecordRequest($ContentArea, $action); } }
public static function handleRecordRequest(ActiveRecord $Key, $action = false) { switch ($action ?: ($action = static::shiftPath())) { case 'endpoints': return static::handleEndpointsRequest($Key); case 'share': return static::handleShareRequest($Key); case 'revoke': return static::handleRevokeRequest($Key); default: return parent::handleRecordRequest($Key, $action); } }
public static function handleRecordRequest(ActiveRecord $Alert, $action = false) { switch ($action ?: ($action = static::shiftPath())) { case 'acknowledge': return static::handleAcknowledgeRequest($Alert); case 'dismiss': return static::handleDismissRequest($Alert); case 'email-preview': return static::handleEmailPreviewRequest($Alert); default: return parent::handleRecordRequest($Alert, $action); } }
public static function handleRecordRequest(\ActiveRecord $Project, $action = false) { switch ($action ? $action : ($action = static::shiftPath())) { case 'add-member': return static::handleAddMemberRequest($Project); case 'remove-member': return static::handleRemoveMemberRequest($Project); case 'change-maintainer': return static::handleChangeMaintainerRequest($Project); case 'updates': return static::handleUpdatesRequest($Project); case 'comment': return static::handleCommentRequest($Project); default: return parent::handleRecordRequest($Project, $action); } }
public static function handleInfoRequest($mediaID) { if (empty($mediaID) || !is_numeric($mediaID)) { static::throwError('Missing or invalid mediaID'); } // get media try { $Media = Media::getById($mediaID); } catch (UserUnauthorizedException $e) { return static::throwUnauthorizedError('You are not authorized to download this media'); } if (!$Media) { static::throwNotFoundError('Media ID #%u was not found', $mediaID); } return parent::handleRecordRequest($Media); }