Details

      Description

      The class com.liferay.portal.kernel.util.ArrayUtil offers a wide range of array utility functions.

      But in difference to the most of them, the reverse function is only available for String[] not for Object[].

      Example for an usecase:
      When generating something like a breadcrumb in a theme, I would like to use:

        #foreach ($ancestor in $arrayUtil.reverse($layout.ancestors))
        ...
        #end
      

      (The getAncestestors() method returns the parents with the root as last object, but a breadcrumb usually prints the root as first object)

      I know that I could use #breadcrumbs(), but that is not configurable enough (e.g. it doesn't support the google syntax).

        Attachments

          Activity

            People

            • Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              starrunner Tobias Liefke
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Packages

                Version Package