06 Jun, 16

#Drupal 8: to get user fields U type this combo: \Drupal\user\Entity\User::load(\Drupal::currentUser()->id()); Try not to break your fingers

26 May, 16

"Never memorize something that you can look up." - Albert Einstein... #Drupal 8 I'm looking at you!

06 May, 16

Snippet: How to check for user access or permission in Drupal 8

  1. <?php
  2. // Get current user
  3. $user = \Drupal::currentUser();
  4. // Check for permission
  5. $user->hasPermission('administer content');
Read now
03 May, 16

How To Disable #Drupal 8 caching during development https://www.drupal.org/node/2598914 Definitely Drupal 8 isn’t the most developer friendly thing now…

15 Apr, 16

JQuery.cookie in Drupal 7

A quick tip for all Drupalistas outhere: if you want to use jQuery.cookie in your project, you actually don't have to download and install the library. jQuery.cookie is a part of Drupal 7 and can be included as easy as typing: 

  1. drupal_add_library('system', 'jquery.cookie');

Wondering ...

Read now
09 Nov, 15

Default Search API Sorts Per View in Drupal 7

It's been a while since I've written a post here (especially, Drupal-related). But today I have something interesting to share.

There's a module called Search API sorts (https://drupal.org/project/search_api_sorts) that provides custom sorts and a global sort block for Search API. The module itself is ok, but ...

Read now
10 Jul, 15

Even if #Drupal 8 gets released after closing remaining 14 criticals, Im not ready to offer my clients a solution that has 900+ major issues

20 Apr, 15

Happy birthday to me and Devel form debug module to you all

I’m turning 32 today. People love birthdays, to me it’s just another line number in a messed stack trace output (philosophy mode enabled).
Two years ago I released a drupal module called Get form id (deprecated from now on) that does one small task - it tells you any form's id ...
Read now
24 Mar, 15

For those who're wondering why "#Django for #Drupal developers"? well because it's easier to learn by analogy and I've gone down this path

27 Oct, 14

How To Force Search API To Reindex a Node / an Entity

By default Search API (Drupal 7) reindexes a node when the node gets updated. But what if you want to reindex a node / an entity on demand or via some other hook i.e. outside of update cycle? Turned out it is a quite simple exercise. You just need to ...

Read now