Questions tagged [drupal-console]

Use it for the suite of tools run from a command line interface to generate boilerplate code: the Drupal Console.

Filter by
Sorted by
Tagged with
1
vote
1answer
67 views

How do I download a specific version of a module?

The official documentation for Drupal Console says that the arguments for drupal module:download are the following. drupal module:download [arguments] [options] is there an argument or option to ...
8
votes
2answers
2k views

Define module as feature

Creating a module with Drupal Composer asks me: Define module as feature (yes/no) What does it mean?
1
vote
2answers
359 views

How do I export a content type, views as a single module

I've a view, content type, field collection, flexslider to satisfy a single user case. May I know how to export all these three as a single module.
3
votes
3answers
8k views

views exposed filter to have dropdown of entity reference in cutstom entity

I generated with drupal console utility my own module and content entity code. After I added a user entity reference field and a taxonomy term entity reference field. Now I'm listing my content with ...
3
votes
1answer
380 views

Render a view in a given language in a custom command

I have written a Drupal Console command that creates a huge batch of HTML snippets. This is done by rendering a view programmatically (as in this StackExchange answer) The task Now I have to create ...
1
vote
1answer
38 views

Why are the commands implemented by a custom module still listed after uninstalling it?

I registered a new command via Drupal Console using drupal generate:command. I associated the command with a custom module, but after uninstalling the module and removing the module folder, the ...
3
votes
3answers
722 views

How to properly set up Drupal Console on Windows 7

I have been trying to set up Drupal Console for quite some time now on Windows 7; however, there always seems to be some kind of error which I am unable to solve. I have installed Drupal Console via ...
2
votes
1answer
479 views

Are use Drupal\Core\Form\FormStateInterface statements for a Drupal 8 hook required?

This may be obvious to expert D8 users, but; If I am implementing hook_form_alter in Drupal 8, the hook definition looks like this: hook_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $...
2
votes
1answer
627 views

Why are most of the commands missing?

Most of console commands are missing from the output of drupal list. I am using Drupal Console version 0.11.3, which outputs the following error message. [WARNING] In order to list all of the ...
2
votes
1answer
271 views

How to configure multisites for the console?

Most of console commands are not listed when using drupal list Drupal Console version 0.11.3 It issues a warning like so: [WARNING] In order to list all of the available commands you should ...
4
votes
2answers
8k views

Rebuild node access permissions

How can I rebuild the node access permissions? drupal node:access:rebuild returns the following error message. [Symfony\Component\Console\Exception\CommandNotFoundException] There are no commands ...
3
votes
2answers
4k views

How to configure programmatically a unique constraint on several fields of a custom entity?

How could I configure a unique constraint on several fields of a custom entity I have already created with drupalconsole. The purpose is not allowing insert of two record of the same entity having ...
1
vote
1answer
356 views

How do I display all available field types?

I want generate an new form in a custom module via the generate:form command. In this step, I must enter a field type. How can I get all available field types?
2
votes
1answer
2k views

How to add an specific action button in views?

Is there any way to add a specific action button in view module for an entity I've created programmatically. More specifically, I want to make a search of my entity in view, and having beside each ...
2
votes
0answers
215 views

Drupal console report that mysql extension needs to be installed

Hi I am a novice at this stuff so that might explain the following: During my Drupal 8 install I received the following: The libmysqlclient driver version 5.6.26 is less than the minimum ...
10
votes
4answers
5k views

Is Drupal Console aimed to replace Drush?

Is Drupal Console (which is available for Drupal 8) aimed to totally or partially replace Drush?
1
vote
0answers
278 views

How can I add fields to an entity?

I'm coming from a do-it-yourself database design background, so bare with me. Let's say I want two database tables, one of car manufacturers, and one of car models. The first table, car_make, would ...
0
votes
0answers
58 views

Migration command error

On Drupal 8.0.5, I have created a d6_migration module with the following dependencies. dependencies: - migrate_drupal I activated my custom module, and I ran drupal migrate:debug which is ...
0
votes
1answer
155 views

How can I remove nodes?

How can I remove nodes using Drupal Console?
1
vote
0answers
467 views

How to unit test custom console ContainerAwareCommand in Drupal 8

I have a custom console command that extends Drupal\Console\Command\ContainerAwareCommand. Inside the command I need to access the container to fetch a service. But now I'm struggling with figuring ...

1
2