/** * Get copyright info from exercise * * @return array */ public function getCopyRightInfo() { $result = array(); if ($this->soundFile !== null && strlen(trim($this->soundFile->getDescription()))) { $result[] = array('text' => $this->soundFile->getDescription(), 'type' => 'audio', 'exercise' => $this->number + 1); } if ($this->pdfFile !== null && strlen(trim($this->pdfFile->getDescription()))) { $result[] = array('text' => $this->pdfFile->getDescription(), 'type' => 'pdf', 'exercise' => $this->number + 1); } if ($this->image !== null && strlen(trim($this->image->getCopyright()))) { $result[] = array('text' => $this->image->getCopyright(), 'type' => 'image', 'exercise' => $this->number + 1); } if ($this->textContent !== null && strlen(trim($this->textContent->getCopyright()))) { $result[] = array('text' => $this->textContent->getCopyright(), 'type' => 'text', 'exercise' => $this->number + 1); } return $result; }