Issue #3395960 : Add new feature field formatters module
8 open threads
Merge request reports
Activity
added 1 commit
- 48a4cdd7 - add source context when build props and slots
25 25 */ 26 26 public function alter(array $element) { 27 27 $element = $this->cleanSlotsValues($element); 28 if (empty($element['#slots'])) { 29 $element['#slots'] = []; 30 } 31 $element['#propsAlter'] = []; 25 25 */ 26 26 public function alter(array $element) { 27 27 $element = $this->cleanSlotsValues($element); 28 if (empty($element['#slots'])) { Trigerring fatal
| TypeError: Drupal\sdc\Element\ComponentElement::generateComponentTemplate(): Argument #2 ($slots) must be of type array, null given, called in /var/www/html/web/core/modules/sdc/src/Element/ComponentElement.php on line 67 in Drupal\sdc\Element\ComponentElement->generateComponentTemplate() (line 98 of /var/www/html/web/core/modules/sdc/src/Element/ComponentElement.php).+
57 57 protected function buildProps(array $build, Component $component, array $configuration, array $contexts): array { 58 58 $props = $component->metadata->schema['properties'] ?? []; 59 59 foreach ($props as $prop_id => $prop_definition) { 60 $prop_configuration = $configuration['props'][$prop_id] ?? []; 60 $prop_configuration = $configuration['ui_patterns']['props'][$prop_id] ?? []; 113 113 protected function buildSlots(array $build, Component $component, array $configuration, array $contexts): array { 114 114 $slots = $component->metadata->slots ?? []; 115 115 foreach ($slots as $slot_id => $slot_definition) { 116 $slot_configuration = $configuration['slots'][$slot_id] ?? []; 116 $slot_configuration = $configuration['ui_patterns']['slots'][$slot_id] ?? []; 143 143 '#type' => 'component', 144 144 '#component' => $component_id ?? $this->getComponentConfiguration()['component_id'], 145 145 '#ui_patterns' => $this->getComponentConfiguration(), 146 '#source_context' => $this->getComponentSourceContexts(), changed this line in version 13 of the diff
100 100 } 101 101 } 102 102 if ($selected_source) { 103 $build_info = $form_state->getBuildInfo(); Need to have context on settings source form in order to build some form settings in dependency with the context. (maybe not the right place to set inside build info ?)
Edited by Thomas MUSAchanged this line in version 12 of the diff
59 59 60 60 /** @var \Drupal\ui_patterns\SourcePluginManager $sources_manager */ 61 61 $sources_manager = \Drupal::service("plugin.manager.ui_patterns_source"); 62 $source_ids = array_keys($sources_manager->getDefinitionsForPropType('slot', self::getComponentSourceContexts($element))); 62 $contexts = self::getComponentSourceContexts($element); 63 64 $build_info = $form_state->getBuildInfo(); changed this line in version 12 of the diff
added 13 commits
-
240c9ef3...73b5ebb7 - 4 commits from branch
project:2.0.x
- fd5132be - fix new update
- 1d873ad6 - update
- 60886eb8 - update
- 1f2c82b8 - fix new update
- dac87644 - update
- e9fdb0cb - add source context when build props and slots
- 8bc3bc32 - update
- e5c7b673 - update
- d93ed8e9 - Merge branch 'rebase-02-09-24' into 2.0.x
Toggle commit list-
240c9ef3...73b5ebb7 - 4 commits from branch
added 105 commits
- 73b5ebb7...1a595c34 - 95 earlier commits
- 9ae8cc57 - update rebase code 28-02-24
- d6062e11 - update
- 9ccb4407 - update
- 51e60b3a - update
- 0bb6a9ee - update
- 3dc2ff0e - update
- e8db3857 - update
- aed57216 - Deriver test
- 0da2f927 - update
- c5ab3182 - Merge remote-tracking branch 'origin/3395960-2.0.x-add-new' into 2.0.x
Toggle commit list
Please register or sign in to reply