Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-25303

Make complex FieldTypes such as Relation or Selection usable as content names

    Details

    • Epic Name:
      Implement getName() support on more advanced FieldTypes

      Description

      Type::getName() is currently not implemented by some FieldTypes, such as Relation or Selection. This has been reported (EZP-24640) as a bug by some users.

      Enabling this has different requirements depending on the FieldType. Selection::getName() requires access to the FieldDefinition, while Relation would need to load the related Content item(s) to get its name.

      getName() must be implemented for FieldTypes that make sense as name elements.

        Issue Links

          Issues in Epic

            Activity

            Hide
            André Rømcke added a comment -

            Exploration into changes needed for our API/SPI is on-going in EZP-24648.

            Show
            André Rømcke added a comment - Exploration into changes needed for our API/SPI is on-going in EZP-24648 .
            Hide
            André Rømcke added a comment -

            getName() is already part of the existing interface, so all existing field types already have this (but some threw exception because they did not have the data they need to compute the name).

            So this is where Namable comes in, it's a optional extra service a field type can choose to implement, and if done and registered using the new tag, <FieldType>Namable-> getFieldName() will be used. Otherwise fallback to good old <FieldType>-> getName().

            Show
            André Rømcke added a comment - getName() is already part of the existing interface, so all existing field types already have this (but some threw exception because they did not have the data they need to compute the name) . So this is where Namable comes in, it's a optional extra service a field type can choose to implement, and if done and registered using the new tag, <FieldType>Namable-> getFieldName() will be used. Otherwise fallback to good old <FieldType>-> getName() .

              People

              • Assignee:
                Unassigned
                Reporter:
                Bertrand Dunogier
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: