3 declare(strict_types=1);
    43         $pipeline[] = [
'$facet' => [
    45                 [
'$group' => [
'_id' => null, 
'count' => [
'$sum' => 1]]]
    51         $pipeline[] = [
'$unwind' => 
'$stage1'];
    55                 'maxcount' => 
'$stage1.count',
    56                 'statements' => 
'$stage2.statement'    72             array(
'$skip' => (
int) $this->
filter->getOffset())
    75         if ($this->
filter->getLimit() !== 0) {
    76             $stage[] = array(
'$limit' => (
int) $this->
filter->getLimit());
    86         $cmi5_extensions_query = 
false;
    89         $stage[
'statement.object.objectType'] = 
'Activity';
    90         $stage[
'statement.actor.objectType'] = 
'Agent';
    91         if ($this->
filter->getVerb()) {
    92             $stage[
'statement.verb.id'] = $this->
filter->getVerb();
    95         if ($this->
filter->getStartDate() || $this->
filter->getEndDate()) {
    96             $stage[
'statement.timestamp'] = array();
    98             if ($this->
filter->getStartDate() !== null) {
    99                 $stage[
'statement.timestamp'][
'$gt'] = $this->
filter->getStartDate()->toXapiTimestamp();
   102             if ($this->
filter->getEndDate() !== null) {
   103                 $stage[
'statement.timestamp'][
'$lt'] = $this->
filter->getEndDate()->toXapiTimestamp();
   108         $activityId = array();
   112             $activityId[
'statement.context.extensions.https://ilias&46;de/cmi5/activityid'] = $obj->getActivityId();
   116                 '$regex' => 
'^' . preg_quote($this->
filter->getActivityId()) . 
''   118             $activityId[
'$or'] = [];
   123             $activityId[
'$or'][] = [
'statement.object.id' => $activityQuery];
   124             $activityId[
'$or'][] = [
'statement.context.contextActivities.parent.id' => $activityQuery];
   130         if ($obj->isMixedContentType()) {
   131             if ($this->
filter->getActor()) {
   134                     $actor[
'$or'][] = [
'statement.actor.mbox' => 
"mailto:{$usrIdent}"]; 
   135                     $actor[
'$or'][] = [
'statement.actor.account.name' => 
"{$usrIdent}"];
   138                 if (count($actor) == 0) {
   139                     $actor[
'$or'][] = [
'statement.actor.mbox' => 
"mailto:{$this->filter->getActor()->getUsrIdent()}"]; 
   140                     $actor[
'$or'][] = [
'statement.actor.account.name' => 
"{$this->filter->getActor()->getUsrIdent()}"];
   145                     $actor[
'$or'][] = [
'statement.actor.mbox' => 
"mailto:{$cmixUser->getUsrIdent()}"];
   146                     $actor[
'$or'][] = [
'statement.actor.account.name' => 
"{$cmixUser->getUsrIdent()}"];
   150             if ($this->
filter->getActor()) {
   151                 $cmixUser = $this->
filter->getActor();
   152                 $actor[
'statement.context.registration'] = $cmixUser->getRegistration();
   155             if ($this->
filter->getActor()) {
   157                     $actor[
'$or'][] = [
'statement.actor.mbox' => 
"mailto:{$usrIdent}"];
   160                 if (count($actor) == 0) {
   161                     $actor[
'statement.actor.mbox'] = $this->
filter->getActor()->getUsrIdent();
   172                     $actor[
'$or'][] = [
'statement.actor.mbox' => 
"mailto:{$cmixUser->getUsrIdent()}"];
   177         $stage[
'$and'][] = $activityId;
   178         if (count($actor) > 0) {
   179             $stage[
'$and'][] = $actor;
   181         return array(
'$match' => $stage);
   193             $privacyName = $obj->getProvider()->getPrivacyName();
   195             $privacyName = $obj->getPrivacyName();
   199             $actor = 
'statement.actor.name';
   202                 if ($obj->getPublisherId() == 
'') { 
   203                     $actor = 
'statement.actor.mbox';
   205                     $actor = 
'statement.actor.account.name';
   208                 $actor = 
'statement.actor.mbox';
   211         switch ($this->
filter->getOrderField()) {
   213                 $field = 
'statement.object.id';
   217                 $field = 
'statement.verb.id';
   226                 $field = 
'statement.timestamp';
   230         $orderingFields = array(
   231             $field => $this->
filter->getOrderDirection() == 
'desc' ? -1 : 1
   234         return [
'$sort' => $orderingFields];
 static getLogger(string $a_component_id)
Get component logger. 
 
static getUserIdents(int $objId, int $usrId)
 
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
 
static _lookupType(int $id, bool $reference=false)
 
static getUsersForObject(int $objId, bool $asUsrId=false)