Skip to content
Snippets Groups Projects

Adds gitlab-ci

4 unresolved threads

Closes #3427333

Merge request reports

Merge request pipeline failed for a7e4a36a

Approval is optional
Code Quality is loading
Test summary results are being parsed

Closed by Bálint JunkunczBálint Junkuncz 1 year ago (Apr 4, 2024 11:45am UTC)

Merge details

  • The changes were not merged into 3.x.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
18 18 * @internal
19 19 * Form classes are internal.
20 20 */
21 class EntityCustomElementsDisplayEditForm extends EntityDisplayFormBase {
21 final class EntityCustomElementsDisplayEditForm extends EntityDisplayFormBase {
  • 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;
  • 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);
    • the class is supposed to be a data-model, so I think it's fine in that case to exceptionally call out to \drupal - like in module code. can we simply add something like phpstan-ignore-next-line? that#s much better than a broken DI via __construct.

    • Got it, okay will revert it and keep it in ignore.

    • Please register or sign in to reply
  • 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();
  • added some comments

  • Bálint Junkuncz mentioned in merge request !37 (merged)

    mentioned in merge request !37 (merged)

  • Please register or sign in to reply
    Loading