Verified Commit 8187276b authored by Dave Long's avatar Dave Long
Browse files

docs: #3549662 Fix LongLineDeclaration in module Form directories

By: quietone
By: smustgrave
By: longwave
(cherry picked from commit db51285f)
parent 72144ded
Loading
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -207,7 +207,10 @@ public function validateForm(array &$form, FormStateInterface $form_state) {
      $entity_storage = $this->entityTypeManager->getStorage($form_state->getValue('config_type'));
      // If an entity ID was not specified, set an error.
      if (!isset($data[$id_key])) {
        $form_state->setErrorByName('import', $this->t('Missing ID key "@id_key" for this @entity_type import.', ['@id_key' => $id_key, '@entity_type' => $definition->getLabel()]));
        $form_state->setErrorByName('import', $this->t('Missing ID key "@id_key" for this @entity_type import.', [
          '@id_key' => $id_key,
          '@entity_type' => $definition->getLabel(),
        ]));
        return;
      }

+4 −1
Original line number Diff line number Diff line
@@ -179,7 +179,10 @@ public function buildForm(array $form, FormStateInterface $form_state) {
          if ($config_change_type == 'rename') {
            $names = $storage_comparer->extractRenameNames($config_name);
            $route_options = ['source_name' => $names['old_name'], 'target_name' => $names['new_name']];
            $config_name = $this->t('@source_name to @target_name', ['@source_name' => $names['old_name'], '@target_name' => $names['new_name']]);
            $config_name = $this->t('@source_name to @target_name', [
              '@source_name' => $names['old_name'],
              '@target_name' => $names['new_name'],
            ]);
          }
          else {
            $route_options = ['source_name' => $config_name];
+9 −2
Original line number Diff line number Diff line
@@ -86,7 +86,10 @@ public static function create(ContainerInterface $container) {
   * {@inheritdoc}
   */
  public function getQuestion() {
    return $this->t('Are you sure you want to delete the @language translation of %label?', ['%label' => $this->mapper->getTitle(), '@language' => $this->language->getName()]);
    return $this->t('Are you sure you want to delete the @language translation of %label?', [
      '%label' => $this->mapper->getTitle(),
      '@language' => $this->language->getName(),
    ]);
  }

  /**
@@ -142,7 +145,11 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
      $cache_backend->deleteAll();
    }

    $this->messenger()->addStatus($this->t('@language translation of %label was deleted', ['%label' => $this->mapper->getTitle(), '@language' => $this->language->getName()]));
    $this->messenger()
      ->addStatus($this->t('@language translation of %label was deleted', [
        '%label' => $this->mapper->getTitle(),
        '@language' => $this->language->getName(),
      ]));

    $form_state->setRedirectUrl($this->getCancelUrl());
  }
+8 −2
Original line number Diff line number Diff line
@@ -221,9 +221,15 @@ public function ajaxCallback() {
  public function getTitle(WorkflowInterface $workflow, $entity_type_id) {
    $this->entityType = $this->entityTypeManager->getDefinition($entity_type_id);

    $title = $this->t('Select the @entity_type types for the @workflow workflow', ['@entity_type' => $this->entityType->getLabel(), '@workflow' => $workflow->label()]);
    $title = $this->t('Select the @entity_type types for the @workflow workflow', [
      '@entity_type' => $this->entityType->getLabel(),
      '@workflow' => $workflow->label(),
    ]);
    if ($bundle_entity_type_id = $this->entityType->getBundleEntityType()) {
      $title = $this->t('Select the @entity_type_plural_label for the @workflow workflow', ['@entity_type_plural_label' => $this->entityTypeManager->getDefinition($bundle_entity_type_id)->getPluralLabel(), '@workflow' => $workflow->label()]);
      $title = $this->t('Select the @entity_type_plural_label for the @workflow workflow', [
        '@entity_type_plural_label' => $this->entityTypeManager->getDefinition($bundle_entity_type_id)->getPluralLabel(),
        '@workflow' => $workflow->label(),
      ]);
    }

    return $title;
+4 −1
Original line number Diff line number Diff line
@@ -116,7 +116,10 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta
          '#links' => [
            'select' => [
              'title' => $this->t('Select'),
              'url' => Url::fromRoute('content_moderation.workflow_type_edit_form', ['workflow' => $workflow->id(), 'entity_type_id' => $entity_type->id()]),
              'url' => Url::fromRoute('content_moderation.workflow_type_edit_form', [
                'workflow' => $workflow->id(),
                'entity_type_id' => $entity_type->id(),
              ]),
              'attributes' => [
                'class' => ['use-ajax'],
                'data-dialog-type' => 'modal',
Loading