You are here

protected function ContentExportManagerForm::_tableActions in Content Export YAML 8

1 call to ContentExportManagerForm::_tableActions()
ContentExportManagerForm::buildForm in src/Form/ContentExportManagerForm.php
Form constructor.

File

src/Form/ContentExportManagerForm.php, line 223

Class

ContentExportManagerForm
Class ConfigImportForm.

Namespace

Drupal\content_export_yaml\Form

Code

protected function _tableActions($root_folder, $config_name) {
  $config_name = $root_folder . "/" . $config_name . ".yml";
  $operations['load'] = [
    'title' => $this
      ->t('View diff'),
    'url' => Url::fromRoute('content_export_yaml.manage_content_yaml_view', array(
      'file_single' => $config_name,
    )),
    'attributes' => [
      'class' => [
        'use-ajax',
      ],
      'data-dialog-options' => '{"width":700}',
      'data-dialog-type' => [
        'modal',
      ],
    ],
  ];
  $operations['import'] = array(
    'title' => $this
      ->t('Import'),
    'url' => Url::fromRoute('content_export_yaml.manage_content_yaml_form', array(
      'file_single' => $config_name,
    )),
  );
  $operations['remove'] = array(
    'title' => $this
      ->t('Delete file'),
    'url' => Url::fromRoute('content_export_yaml.manage_content_yaml_form', array(
      'delete' => $config_name,
    )),
  );
  return $operations;
}