drupalconsole

This a very common and basic task we can accomplish easily with DrupalConsole.
We need to have a custom module which contains the code for the following items:

  • A controller for giving a url to our HelloWorld page
  • A routing file in which the that url is related to the class of the controller

All of this can be quickly done with the DrupalConsole command generate:controller , but first let's generate our module

DrupalConsole is not only intended for developers. It also can be useful for site builders, themers or sysadmins.

In this short post we'll see a basic task, intended for site builders: creating a new block with an image inside. It can work as a banner or any badge you want to show in your site.

Ok, let's go.
First, we need to create a module for attaching to it the Banner Block code.

 

I usually try to translate DrupalConsole & its book every new version comes out because i mantain the spanish translation of DrupalConsole.

First of all, the best is to synchronize new strings with the following command:

drupal translation:sync

Then you want to

drupal translation:clean

for removing not already necessary strings.

The best way to check fresh changes is doing a pull and executing:

Resulta que es posible utilizar la arroba para especificar un sitio en DrupalConsole en lugar de --target a la manera en la que se indican los aliases en Drush.

Así, un comando como el siguiente es perfectamente válido :D
drupal @blog.local cr

Un truqui rápido:
Para poner DrupalConsole en español tenéis que crear un archivo

~/.console/config.yml

con el siguiente texto en su interior

application:
language: es

y con eso, ya está! :D

Suscribirse a drupalconsole