You are here

public function ConfigTranslationFieldListBuilder::getFilterLabels in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/config_translation/src/Controller/ConfigTranslationFieldListBuilder.php \Drupal\config_translation\Controller\ConfigTranslationFieldListBuilder::getFilterLabels()

Provides user facing strings for the filter element.

Return value

array

Overrides ConfigTranslationEntityListBuilder::getFilterLabels

File

core/modules/config_translation/src/Controller/ConfigTranslationFieldListBuilder.php, line 102
Contains \Drupal\config_translation\Controller\ConfigTranslationFieldListBuilder.

Class

ConfigTranslationFieldListBuilder
Defines the config translation list builder for field entities.

Namespace

Drupal\config_translation\Controller

Code

public function getFilterLabels() {
  $info = parent::getFilterLabels();
  $bundle = $this->baseEntityInfo
    ->getBundleLabel() ?: $this
    ->t('Bundle');
  $bundle = Unicode::strtolower($bundle);
  $info['placeholder'] = $this
    ->t('Enter field or @bundle', array(
    '@bundle' => $bundle,
  ));
  $info['description'] = $this
    ->t('Enter a part of the field or @bundle to filter by.', array(
    '@bundle' => $bundle,
  ));
  return $info;
}