[1.0.0-beta1] Check if ui_icons_field is working with views

Created on 27 August 2024, 3 months ago
Updated 11 September 2024, 2 months ago

Problem/Motivation

IconFormatter::validateSettings() is doing that:

    // Field UI "MAnage display" page.
    if (isset($values['fields'][$name]['settings_edit_form']['settings'])) {
      $settings = $values['fields'][$name]['settings_edit_form']['settings'];
    }
    // Layout builder UI.
    elseif (isset($values['settings']['formatter']['settings'])) {
      $settings = $values['settings']['formatter']['settings'];
    }

Is it possible to avoid doing such condition which is limited to "Manage display" and "Layout builder":?

I am afraid the plugin will not work with Views and any other config entity from Drupal contrib leveraging this plugin type

Proposed resolution

Test both field formatter (this one and the link one) with views.

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇫🇷France pdureau Paris

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024