You are here

protected function LaunchExportForm::initRootEntitiesList in Content Synchronizer 3.x

Same name and namespace in other branches
  1. 8.2 src/Form/LaunchExportForm.php \Drupal\content_synchronizer\Form\LaunchExportForm::initRootEntitiesList()
  2. 8 src/Form/LaunchExportForm.php \Drupal\content_synchronizer\Form\LaunchExportForm::initRootEntitiesList()

Init Root entities lists for display.

1 call to LaunchExportForm::initRootEntitiesList()
LaunchExportForm::buildForm in src/Form/LaunchExportForm.php
Form constructor.

File

src/Form/LaunchExportForm.php, line 130

Class

LaunchExportForm
Launch Export Form.

Namespace

Drupal\content_synchronizer\Form

Code

protected function initRootEntitiesList(array &$form) {
  $rootEntities = $this
    ->getRootsEntities();
  if (!empty($rootEntities)) {
    $build = [
      '#theme' => 'entities_list_table',
      '#entities' => $rootEntities,
      '#status_or_bundle' => 'bundle',
      '#checkbox_name' => 'entities_to_export[]',
      '#title' => $this
        ->t('Entities to export'),
      '#attached' => [
        'library' => [
          'content_synchronizer/list',
        ],
      ],
    ];
    $form['entities_list'] = $build;
  }
}