Query on Drupal 8 with EntityQuery

Posted on Sat, 01/14/2017 - 16:02 by zhilevan

Often when building a site in Drupal you'll find yourself wanting to display a list of nodes, or find entities created by a particular author, or locate some content based on a particular set of criteria. Rather than querying the database directly, Drupal provides a helper class, EntityQuery, to make things a bit easier.

Read More

Get ride of curious users on headless Drupal

Posted on Fri, 12/16/2016 - 13:37 by zhilevan

We using Drupal 8 as headless ( Decoupled) core of  Zeyton project,we  setup Drupal at core.zeyton.com and that provides data for our Front-end Layer, One of our requirements is only admin could access the Drupal pages, I mean anonymous user couldn't surf Drupal pages So I suggest a plan to satisfy this requirement, my scenario  is when user try to access Drupals pages  we check user if  user is not logged on or current path is not our ENDPOINTS paths redirect user to  login page, In D

Read More

Run a php script in background

Posted on Tue, 11/08/2016 - 23:39 by zhilevan

When we need to run some script without waiting the fronted user till the process is not completed, For that we need to execute some script in background to hiding the execution time to user.This process is hidden to the end user. It improves your Website efficiency.

Read More

Nginx config for Drupal 8

Posted on Sat, 10/29/2016 - 01:25 by zhilevan

Just in case anyone is wondering what's the correct way to configure Nginx for running Drupal 8 installation, or having trouble with Clean URLs or Image styles, I'll post my config as a Gist here.

The Gist will be revised and improved over time, so please come and check for updates! Suggestions or thoughts are welcomed in comments.

Embedded code below:

Read More


Posted on Sun, 10/16/2016 - 10:50 by zhilevan

Annotations are specially-formatted PHP docblock comments that are used for class discovery and metadata description. While it is technically possible to use annotations for other purposes, at the moment Drupal only uses them for the plugin system.

In this tutorial we'll look at:

  • What annotations are
  • The use-case for annotations
  • How to figure out what you can put into an annotation

By the end of this tutorial you should understand how annotations are used in Drupal and how to write them in your own code.

Read More

10 useful nmap Commands for life :D

Posted on Sun, 10/16/2016 - 10:29 by zhilevan

Recently I was compiling a list of Linux commands that every sysadmin should know. One of the first commands that came to mind was nmap.

nmap is a powerful network scanner used to identify systems and services. nmap was originally developed with network security in mind, it is a tool that was designed to find vulnerabilities within a network. nmap is more than just a simple port scanner though, you can use nmap to find specific versions of services, certain OS types, or even find that pesky printer someone put on your network without telling you.

Read More

Short trip on Entity API in Drupal 8

Posted on Tue, 10/11/2016 - 22:06 by zhilevan

There is a lot of literature about entities and their purpose in Drupal 7 context. Most of it has been adopted in Drupal 8 as well. In this post, I'll highlight the differences between D7 and D8 entities and how to use the entity API in 8.

Entities have their own classes in 8. Also, Drupal 8 introduces the concept of config entities. These are used to store user-created configuration if its more than a piece of text, boolean or integer. They differ from the usual entities in the following ways:

Read More