headless icon indicating copy to clipboard operation
headless copied to clipboard

[FEATURE] New DataProcessor: ExtractPropertyProcessor

Open kitzberger opened this issue 3 years ago • 2 comments

This could be used to reduce the ogImage property from an array to a simple string.

lib.meta.fields.ogImage = TEXT
lib.meta.fields.ogImage {
   dataProcessing {
      # Use the column 'og_image' to render an array with all relevant
      # information (such as the publicUrl)
      10 = FriendsOfTYPO3\Headless\DataProcessing\FilesProcessor
      10.as = media
      10.references.fieldName = og_image
      10.processingConfiguration.returnFlattenObject = 1

      # Extract only property 'publicUrl' from the above created array
      20 = FriendsOfTYPO3\Headless\DataProcessing\ExtractPropertyProcessor
      20.key = media.publicUrl
      20.as = media
   }
}

kitzberger avatar Jan 30 '23 09:01 kitzberger

Pull Request Test Coverage Report for Build 4042415372

  • 0 of 14 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.7%) to 59.719%

Changes Missing Coverage Covered Lines Changed/Added Lines %
Classes/DataProcessing/ExtractPropertyProcessor.php 0 14 0.0%
<!-- Total: 0 14
Totals Coverage Status
Change from base Build 4014243043: -0.7%
Covered Lines: 679
Relevant Lines: 1137

💛 - Coveralls

coveralls avatar Jan 30 '23 09:01 coveralls

I think this could come in handy. 👍

schloram avatar Nov 15 '23 13:11 schloram

Yeah, thanks for merging :muscle:

kitzberger avatar May 10 '24 11:05 kitzberger