You made the switch from drush to drupal console, but now pulling your hair out because none of the drush commands work using drupal. Spare your follicles and use this list of Drupal 8 console commands.
With the release of Drupal 8 comes the new CLI to generate boilerplate code, interact and debug Drupal (for earlier versions of Drupal, see drush-related coder module tools). The transition from
drupal can be a little bit frustrating learning the new commands. To help ease the stress, I’ve put together a list of the most common Drupal 8 Console commands. Continue reading “Drupal 8 Console Commands”
Need an array of user roles in your Drupal 8 site? Say goodbye to
user_roles(), say hello to
This function will return an associative array with the role id as the key and the role name as the value.
Continue reading “Drupal 8: Get an Array of User Roles”
Looking for how to create new module permissions in Drupal 8? Look no further,
$module.permissions.yml to the rescue!
In Drupal 8 permissions are now defined in
$module.permissions.yml file instead of using
Continue reading “Drupal 8: Create Module Permissions”
In the past four years there has been an explosion of new technologies in front-end development. We are inundated with new projects like Bower, Cucumber, Behat and KSS. It is a lot to take in. At the past two Drupalcons there have been sessions about this overload (Austin 2014, My Brain is Full: The state of Front-end developement). Essentially those sessions are asking “What the hell is going on?”
Continue reading “Automating Styleguides with Styleguide-Driven Development”
Need to programmatically create or delete an image style in Drupal? Maybe you’re creating a module that needs to define a new style or looking to use an update handler to delete one. It’s a cinch to do with just a few lines of code.
I recently needed to delete a image style that was no longer being used with a update handler. Being that Drupal’s documentation is less than informative, I did some digging and finally figured it out. Check out how to create, flush and delete image styles below. Continue reading “Programmatically Create & Delete Image Styles in Drupal”