Skip to content

Commit a835913

Browse files
committed
Merge branch 'master' of github.com:hechoendrupal/drupal-console
2 parents 5aff47c + 28d741c commit a835913

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

src/Command/Config/ExportCommand.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Drupal\Console\Core\Command\Command;
1919
use Symfony\Component\Filesystem\Filesystem;
2020
use Drupal\Core\Config\ConfigManager;
21+
use Webmozart\PathUtil\Path;
2122

2223
class ExportCommand extends Command
2324
{
@@ -95,20 +96,22 @@ protected function interact(InputInterface $input, OutputInterface $output)
9596
*/
9697
protected function execute(InputInterface $input, OutputInterface $output)
9798
{
98-
$drupal_root = $this->drupalFinder->getComposerRoot();
99-
$directory = $drupal_root.'/'.$input->getOption('directory');
99+
$directory = $input->getOption('directory');
100100
$tar = $input->getOption('tar');
101101
$removeUuid = $input->getOption('remove-uuid');
102102
$removeHash = $input->getOption('remove-config-hash');
103-
$drupal_root = $this->drupalFinder->getComposerRoot();
104103

105104
if (!$directory) {
106105
$directory = Settings::get('config_sync_directory') ;
107106
}
107+
if (!Path::isAbsolute($directory)) {
108+
$drupal_root = $this->drupalFinder->getDrupalRoot();
109+
$directory = $drupal_root . "/" . $directory;
110+
}
108111

109112
$fileSystem = new Filesystem();
110113
try {
111-
$fileSystem->mkdir($drupal_root."/".$directory);
114+
$fileSystem->mkdir($directory);
112115
} catch (IOExceptionInterface $e) {
113116
$this->getIo()->error(
114117
sprintf(

templates/module/src/Plugin/Block/block.php.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class {{class_name}} extends BlockBase {% if services is not empty %}implements
5555
return [
5656
{% for input in inputs %}
5757
{% if input.default_value is defined and input.default_value|length %}
58-
'{{ input.name }}' => {{ input.default_value }},
58+
'{{ input.name }}' => $this->('{{ input.default_value }}'),
5959
{% endif %}
6060
{% endfor %}
6161
] + parent::defaultConfiguration();
@@ -111,7 +111,7 @@ class {{class_name}} extends BlockBase {% if services is not empty %}implements
111111
{% endif %}
112112
{% for input in inputs %}
113113
{% if twig_template is defined %}
114-
$build['#conten'][] = $this->configuration['{{ input.name }}'];
114+
$build['#content'][] = $this->configuration['{{ input.name }}'];
115115
{% else %}
116116
$build['{{plugin_id}}_{{ input.name }}']['#markup'] = '<p>' . $this->configuration['{{ input.name }}'] . '</p>';
117117
{% endif %}

templates/module/src/Plugin/CKEditorPlugin/plugin.php.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @preserve
66
**/
77
{% for button in buttons %}
8-
CKEDITOR.plugins.add('{{ pligins_id }}', {
8+
CKEDITOR.plugins.add('{{ plugin_id }}', {
99
init: function( editor ) {
1010
if ( editor.ui.addButton ) {
1111
editor.ui.addButton( '{{ button.name }}', {

0 commit comments

Comments
 (0)