Skip to main content

How can I find out the ID of the block?

We can find all block id's with the following ways.

using drush

 

drush ev "print_r(array_keys(\Drupal::service('plugin.manager.block')->getDefinitions()));"

 

programmatically

 

kint(array_keys(\Drupal::service('plugin.manager.block')->getDefinitions()));