12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- /**
- * @file
- * Export content into YAML files.
- */
- /**
- * Implements hook_drush_command().
- */
- function reinstall_drush_command() {
- $items['reinstall-export'] = [
- 'description' => 'Export site content.',
- 'arguments' => [],
- 'required-arguments' => 0,
- 'aliases' => ['rex'],
- 'options' => [],
- 'drupal dependencies' => [],
- ];
- return $items;
- }
- /**
- * Drush callback for reinstall-export.
- *
- * @param string $entity_type
- * The entity type.
- * @param array $bundles
- * An array of bundle names to export.
- */
- function drush_reinstall_export($entity_type = NULL, ...$bundles) {
- /** @var \Drupal\reinstall\Dumper $dumper */
- $dumper = \Drupal::service('reinstall.dumper');
- $dumper->dump($entity_type, $bundles);
- }
|