Skip to content

Commit

Permalink
[console] Fixed coding standards (#4072)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjuarez20 authored and enzolutions committed May 31, 2019
1 parent 4734956 commit ee79d2e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/Command/Config/ExportSingleCommand.php
Expand Up @@ -103,7 +103,7 @@ protected function configure()
'directory',
null,
InputOption::VALUE_OPTIONAL,
$this->trans('commands.config.export.arguments.directory')
$this->trans('commands.config.export.options.directory')
)->addOption(
'module',
null,
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Config/ImportSingleCommand.php
Expand Up @@ -63,7 +63,7 @@ protected function configure()
'directory',
null,
InputOption::VALUE_OPTIONAL,
$this->trans('commands.config.import.arguments.directory')
$this->trans('commands.config.import.options.directory')
)
->setAliases(['cis']);
}
Expand Down
7 changes: 6 additions & 1 deletion templates/module/js/commands.php.twig
@@ -1,5 +1,10 @@
/**
* @file
*/

(function ($, Drupal) {
Drupal.AjaxCommands.prototype.{{ method }} = function (ajax, response, status) {
console.log(response.message);
}
})(jQuery, Drupal);

})(jQuery, Drupal);
1 change: 0 additions & 1 deletion templates/module/services.yml.twig
Expand Up @@ -16,5 +16,4 @@ services:
tags:
- { {{ tagsAsArray(tags)|join(', ') }} }
{% endif %}

{% endif %}
18 changes: 9 additions & 9 deletions templates/module/src/cache-context.php.twig
Expand Up @@ -15,8 +15,8 @@ use Drupal\Core\Cache\Context\CacheContextInterface;

{% block class_declaration %}
/**
* Class {{ class }}.
*/
* Class {{ class }}.
*/
class {{ class }} implements CacheContextInterface {% endblock %}

{% block class_construct %}
Expand All @@ -25,29 +25,29 @@ class {{ class }} implements CacheContextInterface {% endblock %}
* Constructs a new {{ class }} object.
*/
public function __construct({{ servicesAsParameters(services)|join(', ') }}) {
{{ serviceClassInitialization(services) }}
{{ serviceClassInitialization(services) }}
}

{% endblock %}

{% block class_methods %}
/**
* {@inheritdoc}
*/
* {@inheritdoc}
*/
public static function getLabel() {
\Drupal::messenger()->addMessage('Lable of cache context');
}

/**
* {@inheritdoc}
*/
* {@inheritdoc}
*/
public function getContext() {
// Actual logic of context variation will lie here.
}

/**
* {@inheritdoc}
*/
* {@inheritdoc}
*/
public function getCacheableMetadata() {
return new CacheableMetadata();
}
Expand Down
2 changes: 1 addition & 1 deletion templates/module/twig-template-file.twig
@@ -1 +1 @@
<!-- Add you custom twig html here -->
<!-- Add you custom twig html here -->

0 comments on commit ee79d2e

Please sign in to comment.