Need an array of user roles in your Drupal 8 site? Say goodbye to user_roles(), say hello to user_role_names(). This function will return an associative array with the role id as the key and the role name as the value. For more information, see https://api.drupal.org/api/drupal/core!modules!user!user.module/function/user_role_names/8.2.x.
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 hook_permission(). Drupal 8 Static Permissions Create a new file in the root of your module folder and name it my_module.permissions.yml. Drupal 8 Dynamic Permissions […]
Boost the performance of your Drupal 7 website, improve usability and help with SEO by making content load via AJAX in just a few steps. Drupal AJAX is a cinch to implement—as it should be since core is loaded with it. In just a few of steps I’ll show you how to use jQuery and […]