/**
  * Returns an array wih the absolute path to all FAL files in the given object-property
  *
  * @param AbstractEntity $object
  * @param string $propertyName
  * @return array
  */
 protected function getAttachmentsFromProperty($object, $propertyName)
 {
     $attachments = [];
     $property = $object->_getProperty($propertyName);
     if ($property instanceof \TYPO3\CMS\Extbase\Persistence\ObjectStorage) {
         /** @var $property \TYPO3\CMS\Extbase\Persistence\ObjectStorage */
         foreach ($property as $object) {
             if ($object instanceof \TYPO3\CMS\Extbase\Domain\Model\FileReference) {
                 $attachments[] = $object->getOriginalResource()->getForLocalProcessing(false);
             }
         }
     }
     if ($property instanceof \TYPO3\CMS\Extbase\Domain\Model\FileReference) {
         /** @var $property \TYPO3\CMS\Extbase\Domain\Model\FileReference */
         $attachments[] = $property->getOriginalResource()->getForLocalProcessing(false);
     }
     return $attachments;
 }