/** * @param Dropzone $dropzone * @param Drop $drop * @param Document $document */ public function __construct(Dropzone $dropzone, Drop $drop, Document $document) { $documentsDetails = array(); foreach ($drop->getDocuments() as $document) { $documentsDetails[] = $document->toArray(); } $details = array('dropzone' => array('id' => $dropzone->getId()), 'drop' => array('id' => $drop->getId(), 'documents' => $documentsDetails), 'document' => $document->toArray()); parent::__construct($dropzone->getResourceNode(), $details); }
/** * @param Dropzone $dropzone * @param Drop $drop * @param Document $document */ public function __construct(Dropzone $dropzone, Drop $drop, Document $document) { $details = array('dropzone' => array('id' => $dropzone->getId()), 'drop' => array('id' => $drop->getId(), 'owner' => array('id' => $drop->getUser()->getId(), 'lastName' => $drop->getUser()->getLastName(), 'firstName' => $drop->getUser()->getFirstName(), 'username' => $drop->getUser()->getUsername())), 'document' => $document->toArray()); parent::__construct($dropzone->getResourceNode(), $details); }