/** * Return image rights. * * @return mixed array with keys: * 'copyright' Copyright (e.g. 'CC BY 4.0') (optional) * 'description Human readable description (array) * 'link' Link to copyright info * or false if the record contains no images * @access protected */ public function getImageRights() { if (!count($this->getAllImages())) { return false; } $rights = array(); if ($type = $this->getAccessRestrictionsType()) { $rights['copyright'] = $type['copyright']; if (isset($type['link'])) { $rights['link'] = $type['link']; } } $desc = $this->getAccessRestrictions(); if ($desc && count($desc)) { $description = array(); foreach ($desc as $p) { $description[] = (string) $p; } $rights['description'] = $description; } return isset($rights['copyright']) || isset($rights['description']) ? $rights : parent::getImageRights(); }