ModalRouteHelper::routeHasModal mixed return value type

Created on 13 January 2023, almost 2 years ago
Updated 30 September 2023, about 1 year ago

Problem/Motivation

#3324803: Add optional parameters for indiviual routes changes the possible return value of routeHasModal to boolean or array.
Such ambiguity is food for issues, see 🐛 routeHasModal return value breaks form alter check Fixed .

Proposed resolution

  1. Revert the return value of routeHasModal back to boolean only.
  2. Create new function, getRouteParameters (for example), that returns the route parameters as configured in the module and empty array if none,

Of course, this will be a breaking change for cases that use routeHasModal() to get route parameters.

Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

🇧🇪Belgium andreasderijcke Antwerpen / Gent

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024