Skip to content

Generic alt and title for Image Sources, no src in source tags, phpstan and no more Neos 4.3 support

Compare
Choose a tag to compare
@mficzel mficzel released this 04 Jun 10:58
7334d75

Changes;

  1. While the source tag allows an src attribute it is ignored in picture tags. Since this is all Kaleidoscope cares about we can remove this safely.

  2. The codebase is now tested with phpstan. To do so we had to drop the Neos 4.3 support.

  3. All imageSource FusionObjects now support the fusion attributes 'alt' and 'title' that will be used as fallback for the
    respective attributes of the img-tag. That way it is no longer necessary to pass three separate properties around.

Examples:

  1. Use title and alternativeText from node properties with fallback to the asset title:
imageSource = Sitegeist.Kaleidoscope:AssetImageSource {
    asset = ${q(node).property('image')}
    title =  ${q(node).property('title') || q(node).property('image').title}
    alt = ${q(node).property('alternativeText')}
}
  1. Set alt and title for dummy image source
imageSource = Sitegeist.Kaleidoscope:DummyImageSource {
    alt = 'Alternate assigned to source'
    title = 'Title assigned to source'
}