Commit 75fa00b4 authored by masdzen's avatar masdzen
Browse files

prepare to content import

parent 77a50adb
<?php
namespace Drupal\synhelper\Drush;
use Drush\Commands\DrushCommands;
use Symfony\Component\Yaml\Yaml;
use Drupal\Core\Config\FileStorage;
/**
* A Drush commandfile.
*/
class DrushContentImport extends DrushCommands {
/**
* Synhrlper config import.
*
* @param string $directory
* Config directory.
*
* @command synhelper:content
* @aliases scont
* @options arr An option that takes multiple values.
* @usage synhelper:scont /var/www/content
* Import config from /var/www/content.
*/
public function import($directory) {
$this->output()->writeln("Import content from: $directory");
$storage = \Drupal::entityTypeManager()->getStorage('node');
$source = new FileStorage($directory);
}
}
......@@ -7,7 +7,12 @@ services:
class: Drupal\synhelper\Service\ContentImporter
arguments: ['@entity_type.manager']
synhelper.drush:
synhelper.drush_config:
class: \Drupal\synhelper\Drush\DrushConfigImport
tags:
- { name: drush.command }
synhelper.drush_content:
class: \Drupal\synhelper\Drush\DrushContentImport
tags:
- { name: drush.command }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment