You are here

private function ReadonlyFieldWidget::labelOptions in Read-only Field Widget 8

Returns label options for field formatters.

Return value

array The label options

2 calls to ReadonlyFieldWidget::labelOptions()
ReadonlyFieldWidget::settingsForm in src/Plugin/Field/FieldWidget/ReadonlyFieldWidget.php
Returns a form to configure settings for the widget.
ReadonlyFieldWidget::settingsSummary in src/Plugin/Field/FieldWidget/ReadonlyFieldWidget.php
Returns a short summary for the current widget settings.

File

src/Plugin/Field/FieldWidget/ReadonlyFieldWidget.php, line 246

Class

ReadonlyFieldWidget
Plugin implementation of the 'readonly_field_widget' widget.

Namespace

Drupal\readonly_field_widget\Plugin\Field\FieldWidget

Code

private function labelOptions() {
  return [
    'above' => $this
      ->t('Above'),
    'inline' => $this
      ->t('Inline'),
    'hidden' => '- ' . $this
      ->t('Hidden') . ' -',
    'visually_hidden' => '- ' . $this
      ->t('Visually Hidden') . ' -',
  ];
}