You are here

protected function LaunchExportForm::initRootEntitiesList in Content Synchronizer 8

Same name and namespace in other branches
  1. 8.2 src/Form/LaunchExportForm.php \Drupal\content_synchronizer\Form\LaunchExportForm::initRootEntitiesList()
  2. 3.x 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 110

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' => t('Entities to export'),
      '#attached' => [
        'library' => [
          'content_synchronizer/list',
        ],
      ],
    ];
    $form['entities_list'] = $build;
  }
}