/**
  * Add activity list provider
  *
  * @param ActivityListProviderInterface $provider
  */
 public function addProvider(ActivityListProviderInterface $provider)
 {
     $this->providers[$provider->getActivityClass()] = $provider;
     $this->activities = null;
     $this->ownerActivities = null;
     $this->targetClasses = null;
 }
 /**
  * @param ActivityListProviderInterface $provider
  * @param $mapFields
  *
  * @return Criteria
  */
 protected function getCriteriaByProvider(ActivityListProviderInterface $provider, $mapFields)
 {
     $activityClass = $provider->getActivityClass();
     $aclClass = $provider->getAclClass();
     $criteria = new Criteria();
     $appliedCriteria = $this->aclHelper->applyAclToCriteria($aclClass, $criteria, 'VIEW', $mapFields);
     $isGranted = $this->securityContextLink->getService()->isGranted('VIEW', 'entity:' . $aclClass);
     if ($isGranted) {
         $appliedCriteria->andWhere(Criteria::expr()->eq('relatedActivityClass', $activityClass));
     }
     return $appliedCriteria;
 }
 /**
  * Add activity list provider
  *
  * @param ActivityListProviderInterface $provider
  */
 public function addProvider(ActivityListProviderInterface $provider)
 {
     $this->providers[$provider->getActivityClass()] = $provider;
 }