diff --git a/.styleci.yml b/.styleci.yml index 867b055..254d27b 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -22,7 +22,6 @@ enabled: - modernize_types_casting - multiline_comment_opening_closing - native_function_casing - - native_function_invocation - newline_before_semicolons_chained - no_alias_functions - no_alternative_syntax diff --git a/Classes/Domain/ExtractionManager.php b/Classes/Domain/ExtractionManager.php index 42b15d9..c10d0b3 100644 --- a/Classes/Domain/ExtractionManager.php +++ b/Classes/Domain/ExtractionManager.php @@ -68,16 +68,19 @@ protected function buildAssetMetaData(Asset $asset, MetaDataCollection $metaData $collections[] = $collectionObject->getTitle(); } - $assetDto = new Dto\Asset([ + $properties = [ 'Caption' => $asset->getCaption(), - 'CopyrightNotice' => $asset->getCopyrightNotice(), 'Identifier' => $asset->getIdentifier(), 'Title' => $asset->getTitle(), 'FileName' => $asset->getResource()->getFilename(), 'Collections' => $collections, 'Tags' => $tags, 'AssetObject' => $asset, - ]); + ]; + if (method_exists($asset, 'getCopyrightNotice')) { + $properties['CopyrightNotice'] = $asset->getCopyrightNotice(); + } + $assetDto = new Dto\Asset($properties); $metaDataCollection->set('asset', $assetDto); }