Beispiel #1
0
 /**
  * Gets a list of all phone numbers available for the given Case object
  *
  * @param CaseEntity $object
  *
  * @return array of [phone number, phone owner]
  */
 public function getPhoneNumbers($object)
 {
     $relatedContact = $object->getRelatedContact();
     if (!$relatedContact) {
         return [];
     }
     return $this->rootProvider->getPhoneNumbers($relatedContact);
 }
Beispiel #2
0
 /**
  * @param CaseEntity $case
  */
 public function soapInit($case)
 {
     $this->id = $case->getId();
     $this->subject = $case->getSubject();
     $this->description = $case->getDescription();
     $this->owner = $this->getEntityId($case->getOwner());
     $this->assignedTo = $this->getEntityId($case->getAssignedTo());
     $this->relatedContact = $this->getEntityId($case->getRelatedContact());
     $this->relatedAccount = $this->getEntityId($case->getRelatedAccount());
     $this->source = $case->getSource() ? $case->getSource()->getName() : null;
     $this->status = $case->getStatus() ? $case->getStatus()->getName() : null;
     $this->priority = $case->getPriority() ? $case->getPriority()->getName() : null;
     $this->createdAt = $case->getCreatedAt();
     $this->updatedAt = $case->getUpdatedAt();
     $this->reportedAt = $case->getReportedAt();
     $this->closedAt = $case->getClosedAt();
 }