Adds gitlab-ci
4 unresolved threads
4 unresolved threads
Closes #3427333
Merge request reports
Activity
18 18 * @internal 19 19 * Form classes are internal. 20 20 */ 21 class EntityCustomElementsDisplayEditForm extends EntityDisplayFormBase { 21 final class EntityCustomElementsDisplayEditForm extends EntityDisplayFormBase { It was part of the phpstan report: https://git.drupalcode.org/issue/custom_elements-3427333/-/jobs/1052936#L39 Tried to solve it by adding
@phpstan-consistent-constructor
to the class but didn't work. Will take double-check.
82 $this->entityTypeManager = $entityTypeManager; 83 return $this; 84 } 85 86 /** 87 * Gets the entity type manager. 88 * 89 * @return \Drupal\Core\Entity\EntityTypeManagerInterface 90 * The entity type manager. 91 */ 92 public function getEntityTypeManager() { 93 if (empty($this->entityTypeManager)) { 94 $this->entityTypeManager = \Drupal::entityTypeManager(); 95 } 96 return $this->entityTypeManager; 73 $this->entityTypeManager = $entity_type_manager; Hmm right, actually it was a result of a changes suggested by phpstan. I think maybe this one: https://git.drupalcode.org/issue/custom_elements-3427333/-/jobs/1052936#L64 I'm happy to install service-utils and use its traits.
264 281 * @return $this 265 282 */ 266 283 public function setSlotFromRenderArray($key, array $build, string $tag = 'div', array $attributes = [], int $index = NULL, int $weight = 0) { 267 $markup = \Drupal::service('renderer')->renderPlain($build); 284 $markup = $this->renderer->renderPlain($build); 81 81 $id = $entity_type_id . '.' . $bundle . '.default'; 82 82 $element_name = $entity_type_id . '-' . $bundle . '-default'; 83 83 84 /** @var \Drupal\custom_elements\Entity\EntityCeDisplayInterface $config */ 84 85 $config = $storage->create([ 85 86 'id' => $id, 86 87 'targetEntityType' => $entity_type_id, 87 88 'bundle' => $bundle, 88 89 'customElementName' => $element_name, 89 90 'mode' => 'default', 91 'status' => TRUE, 90 92 ]); 91 93 94 // These components must be set 95 // otherwise it breaks item generation. 96 $components = $config->getComponents(); mentioned in merge request !37 (merged)
Please register or sign in to reply