Verified Commit 0b17a574 authored by Dave Long's avatar Dave Long
Browse files

Issue #3464595 by quietone: Fix DrupalPractice.Objects.GlobalFunction in ListBuilders

parent 46ee7302
Loading
Loading
Loading
Loading
Loading
+3 −3
Changes for core/modules/comment/src/CommentTypeListBuilder.php: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -58,9 +58,9 @@ public function getDefaultOperations(EntityInterface $entity) {
   * {@inheritdoc}
   */
  public function buildHeader() {
    $header['type'] = t('Comment type');
    $header['description'] = t('Description');
    $header['target'] = t('Target entity type');
    $header['type'] = $this->t('Comment type');
    $header['description'] = $this->t('Description');
    $header['target'] = $this->t('Target entity type');
    return $header + parent::buildHeader();
  }

+6 −6
Changes for core/modules/contact/src/ContactFormListBuilder.php: 6 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -16,9 +16,9 @@ class ContactFormListBuilder extends ConfigEntityListBuilder {
   * {@inheritdoc}
   */
  public function buildHeader() {
    $header['form'] = t('Form');
    $header['recipients'] = t('Recipients');
    $header['selected'] = t('Selected');
    $header['form'] = $this->t('Form');
    $header['recipients'] = $this->t('Recipients');
    $header['selected'] = $this->t('Selected');
    return $header + parent::buildHeader();
  }

@@ -29,8 +29,8 @@ public function buildRow(EntityInterface $entity) {
    // Special case the personal form.
    if ($entity->id() == 'personal') {
      $row['form'] = $entity->label();
      $row['recipients'] = t('Selected user');
      $row['selected'] = t('No');
      $row['recipients'] = $this->t('Selected user');
      $row['selected'] = $this->t('No');
    }
    else {
      $row['form'] = $entity->toLink(NULL, 'canonical')->toString();
@@ -40,7 +40,7 @@ public function buildRow(EntityInterface $entity) {
        '#context' => ['list_style' => 'comma-list'],
      ];
      $default_form = \Drupal::config('contact.settings')->get('default_form');
      $row['selected'] = ($default_form == $entity->id() ? t('Yes') : t('No'));
      $row['selected'] = ($default_form == $entity->id() ? $this->t('Yes') : $this->t('No'));
    }
    return $row + parent::buildRow($entity);
  }
+1 −1
Changes for core/modules/image/src/ImageStyleListBuilder.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ public function buildRow(EntityInterface $entity) {
   */
  public function getDefaultOperations(EntityInterface $entity) {
    $flush = [
      'title' => t('Flush'),
      'title' => $this->t('Flush'),
      'weight' => 200,
      'url' => $entity->toUrl('flush-form'),
    ];
+4 −4
Changes for core/modules/language/src/LanguageListBuilder.php: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -103,8 +103,8 @@ public function getFormId() {
   */
  public function buildHeader() {
    $header = [
      'label' => t('Name'),
      'default' => t('Default'),
      'label' => $this->t('Name'),
      'default' => $this->t('Default'),
    ] + parent::buildHeader();
    return $header;
  }
@@ -117,7 +117,7 @@ public function buildRow(EntityInterface $entity) {
    $row['default'] = [
      '#type' => 'radio',
      '#parents' => ['site_default_language'],
      '#title' => t('Set @title as default', ['@title' => $entity->label()]),
      '#title' => $this->t('Set @title as default', ['@title' => $entity->label()]),
      '#title_display' => 'invisible',
      '#return_value' => $entity->id(),
      '#id' => 'edit-site-default-language-' . $entity->id(),
@@ -136,7 +136,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
    $form = parent::buildForm($form, $form_state);

    $form[$this->entitiesKey]['#languages'] = $this->entities;
    $form['actions']['submit']['#value'] = t('Save configuration');
    $form['actions']['submit']['#value'] = $this->t('Save configuration');
    return $form;
  }

+5 −5
Changes for core/modules/menu_ui/src/MenuListBuilder.php: 5 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -23,9 +23,9 @@ class MenuListBuilder extends ConfigEntityListBuilder {
   * {@inheritdoc}
   */
  public function buildHeader() {
    $header['title'] = t('Title');
    $header['title'] = $this->t('Title');
    $header['description'] = [
      'data' => t('Description'),
      'data' => $this->t('Description'),
      'class' => [RESPONSIVE_PRIORITY_MEDIUM],
    ];
    return $header + parent::buildHeader();
@@ -50,9 +50,9 @@ public function getDefaultOperations(EntityInterface $entity) {
    $operations = parent::getDefaultOperations($entity);

    if (isset($operations['edit'])) {
      $operations['edit']['title'] = t('Edit menu');
      $operations['edit']['title'] = $this->t('Edit menu');
      $operations['add'] = [
        'title' => t('Add link'),
        'title' => $this->t('Add link'),
        'weight' => 20,
        'url' => $entity->toUrl('add-link-form'),
        'query' => [
@@ -61,7 +61,7 @@ public function getDefaultOperations(EntityInterface $entity) {
      ];
    }
    if (isset($operations['delete'])) {
      $operations['delete']['title'] = t('Delete menu');
      $operations['delete']['title'] = $this->t('Delete menu');
    }
    return $operations;
  }
Loading