Details

    • Aconcagua Sprint 1, Aconcagua Sprint 2

    Description

      New service tags

      ezpublish_rest.output.visitor

      Maps a Request property to an output format (json or xml). It currently only supports matching the Accept HTTP header.

      • tag name: ezpublish_rest.output.visitor
      • attributes:
      • regexp. Either an array of regexp or the name of a container parameter containing such an array

      Example

      services.yml
      parameters:
          ezpublish_rest.output.visitor.class: eZ\Publish\Core\REST\Common\Output\Visitor
          ezpublish_rest.output.visitor.json.mapping:
              - '(^application/vnd\.ez\.api\.[A-Za-z]+\+json$)'
              - '(^application/json$)'
      
      services:
          ezpublish_rest.output.visitor.json:
              class: %ezpublish_rest.output.visitor.class%
              arguments:
                  - @ezpublish_rest.output.generator.json
                  - @ezpublish_rest.output.value_object_visitor.dispatcher
              tags:
                  - { name: ezpublish_rest.output.visitor, regexps: %ezpublish_rest.output.visitor.json.mapping% }
      

      ezpublish_rest.output.value_object_visitor

      Maps a ValueObject class name to a Visitor. This visitor will be used to convert objects returned by the REST controllers to a generic format that can be outputed by an ezpublish_rest.output.visitor service.

      • tag name: ezpublish_rest.output.value_object_visitor
      • attributes:
      • type: The FQN of a ValueObject class (without a leading backslash)

      This services are defined in `value_object_visitors.yml`.

      Example

      value_object_visitors.yml
      parameters:
          ezpublish_rest.output.value_object_visitor.ContentList.class: eZ\Publish\Core\REST\Server\Output\ValueObjectVisitor\ContentList
      
      services:
          ezpublish_rest.output.value_object_visitor.ContentList:
              parent: ezpublish_rest.output.value_object_visitor.base
              class: %ezpublish_rest.output.value_object_visitor.ContentList.class%
              tags:
                  - { name: ezpublish_rest.output.value_object_visitor, type: eZ\Publish\Core\REST\Server\Values\ContentList }
      

      Attachments

        Activity

          People

            bertrand.dunogier@ibexa.co Bertrand Dunogier
            bertrand.dunogier@ibexa.co Bertrand Dunogier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 1 hour, 30 minutes
                1d 1h 30m