You are here

public function SourcePluginUiBase::overviewForm in Translation Management Tool 8

Builds the overview form for the source entities.

Parameters

array $form: Drupal form array.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

string $type: Entity type.

Return value

array Drupal form array.

3 calls to SourcePluginUiBase::overviewForm()
ConfigSourcePluginUi::overviewForm in sources/tmgmt_config/src/ConfigSourcePluginUi.php
Builds the overview form for the source entities.
ContentEntitySourcePluginUi::overviewForm in sources/content/src/ContentEntitySourcePluginUi.php
Builds the overview form for the source entities.
LocaleSourcePluginUi::overviewForm in sources/locale/src/LocaleSourcePluginUi.php
Builds the overview form for the source entities.
3 methods override SourcePluginUiBase::overviewForm()
ConfigSourcePluginUi::overviewForm in sources/tmgmt_config/src/ConfigSourcePluginUi.php
Builds the overview form for the source entities.
ContentEntitySourcePluginUi::overviewForm in sources/content/src/ContentEntitySourcePluginUi.php
Builds the overview form for the source entities.
LocaleSourcePluginUi::overviewForm in sources/locale/src/LocaleSourcePluginUi.php
Builds the overview form for the source entities.

File

src/SourcePluginUiBase.php, line 57

Class

SourcePluginUiBase
Default ui controller class for source plugin.

Namespace

Drupal\tmgmt

Code

public function overviewForm(array $form, FormStateInterface $form_state, $type) {
  $form += $this
    ->overviewSearchFormPart($form, $form_state, $type);
  $form['#attached']['library'][] = 'tmgmt/admin';
  $form['items'] = array(
    '#type' => 'tableselect',
    '#header' => $this
      ->overviewFormHeader($type),
    '#empty' => $this
      ->t('No source items matching given criteria have been found.'),
  );
  return $form;
}