No description
Find a file
Ferdinand Kuhl 03476c6122
All checks were successful
ci/woodpecker/manual/code-style Pipeline was successful
ci/woodpecker/manual/functional-tests Pipeline was successful
ci/woodpecker/push/code-style Pipeline was successful
ci/woodpecker/push/functional-tests Pipeline was successful
Merge branch 'release/1.0.1'
2023-07-25 19:56:34 +02:00
.woodpecker First working version 2023-02-09 13:05:32 +01:00
Classes making the persist cascade of attributes explicit 2023-07-25 19:56:13 +02:00
Configuration First working version 2023-02-09 13:05:32 +01:00
Migrations/Mysql First working version 2023-02-09 13:05:32 +01:00
Resources/Private/Templates/Asset First working version 2023-02-09 13:05:32 +01:00
Tests/Functional First working version 2023-02-09 13:05:32 +01:00
composer.json First working version 2023-02-09 13:05:32 +01:00
README.md First working version 2023-02-09 13:05:32 +01:00

DigiComp.AssetAttributes

Build status

This package allows you to extend Neos Media assets with custom attributes.

This extension overwrites the original edit template of neos/media-browser - that way you get all of your custom properties and matching form fields in the classic asset editor.

You can add new attributes, by adding them to your Settings.yaml:

DigiComp:
  AssetAttributes:
    customAssetProperties:
      author:
        type: 'textarea' # or empty for textfields
        position: 'end'

Each asset instance will get an "attributes" property introduced, you can work with in PHP or DQL.

Examples:

  • Working with Asset instances:

    $assetObject->getAttributes()->set($key, new AssetAttribute($key, $value));
    
  • querying with DQL:

    SELECT att FROM Neos\Media\Domain\Model\Asset a JOIN a.attributes att 
    
  • working with query objects:

    $query = new \Neos\Flow\Persistence\Doctrine\Query(\Neos\Media\Domain\Model\Asset::class);
    $query->setOrderings(['attributes.value' => \Neos\Flow\Persistence\QueryInterface::ORDER_ASCENDING]);