$this->t('Use description as link text'), '#description' => $this->t('Replace the file name by its description when available'), '#type' => 'checkbox', '#default_value' => $this->getSetting('use_description_as_link_text'), ]; return $form; } /** * {@inheritdoc} */ public function settingsSummary() { $summary = parent::settingsSummary(); if ($this->getSetting('use_description_as_link_text')) { $summary[] = $this->t('Use description as link text'); } return $summary; } }