/**
  * @param Wiki         $wiki
  * @param Section      $section
  * @param Contribution $contribution
  */
 public function __construct(Dropzone $dropzone, $newstate, $userIds)
 {
     $this->dropzone = $dropzone;
     $this->newState = $dropzone->getResourceNode()->getName();
     $this->userIds = $userIds;
     $this->details = array();
     $this->userId = $dropzone->getDrops()[0]->getUser()->getId();
     // Récupération du nom et du prénom
     $this->firstName = $dropzone->getDrops()[0]->getUser()->getFirstName();
     $this->lastName = $dropzone->getDrops()[0]->getUser()->getLastName();
     parent::__construct($dropzone->getResourceNode(), $this->details);
 }
 /**
  * @param Wiki         $wiki
  * @param Section      $section
  * @param Contribution $contribution
  */
 public function __construct(Dropzone $dropzone, $newstate, $userIds)
 {
     $this->dropzone = $dropzone;
     $this->type = $dropzone->getResourceNode()->getName();
     $this->userIds = $userIds;
     // Traitement de la traduction pour CE cas. InnovaERV.
     if ($newstate == 'allowDrop') {
         $this->newState = 'Open';
     }
     if ($newstate == 'finished') {
         $this->newState = 'Closed';
     }
     $this->details = array('newState' => $this->newState);
     $this->userId = $dropzone->getDrops()[0]->getUser()->getId();
     // Récupération du nom et du prénom
     $this->firstName = $dropzone->getDrops()[0]->getUser()->getFirstName();
     $this->lastName = $dropzone->getDrops()[0]->getUser()->getLastName();
     parent::__construct($dropzone->getResourceNode(), $this->details);
 }
Пример #3
0
 public function getRequestByUserCount(Dropzone $dropzone)
 {
     $userRequestCount = array();
     foreach ($dropzone->getDrops() as $drop) {
         $user = $drop->getUser();
         $nbAdressedRequests = $this->documentRepo->countTextToRead($user, $dropzone);
         $userRequestCount[$user->getId()] = $nbAdressedRequests;
     }
     return $userRequestCount;
 }