Composer cheatsheet for a Drupalist

Posted on Tue, 11/12/2019 - 19:01 by yuseferi

As you know Composer is a great tool to manage packages and their dependencies in PHP, while in Drupal 8.8 is going to more composer compatible, you can find composer cheatsheet in the following.

 

 

Read More

Update Drupal Automatically - new feature

Posted on Wed, 10/30/2019 - 18:01 by yuseferi

Auto-update Drupal core and modules always have been a high demand in Drupal. hopefully, in the Amsterdam 2019 DrupalCon , Automatic Updates modules has been introduced.  a great module but in begging on its way. but Automatic updates is a great feature in drupal.

it has been introduced as a contrib module, but it will finally go to the core of Drupal.

as you can see in its page in will developed in two phases.

 

Read More

What is Autowiring? how to use Autowire in Drupal

Posted on Thu, 01/10/2019 - 15:09 by yuseferi

 

I heard about the autowiring concept several years ago in spring java, 

 

Autowiring feature of spring framework enables you to inject the object dependency implicitly. It internally uses setter or constructor injection.

in Symfony 2.8, in November 2015, the autowiring concept introduced in a PHP framework for the first time.

Read More

Drupal Global Services, How to use global services in Drupal 8

Posted on Sat, 08/25/2018 - 21:38 by yuseferi

One of the significant improvements of Drupal 8 that got me excited was the services & dependency-injection throughout the entire Drupal system. From aspects like routing, templating, managing configuration, querying and persisting data, you name it everything is done with services. it's fantastic because it grants developers a level of flexibility in extending Drupal that is far greater than what Drupal 7 was able to. by using well-disposed structure developers get ride of ravioli coding.

Read More

Fix Drupal Files/Directories permissions by PHP after hacked

Posted on Wed, 08/08/2018 - 08:48 by yuseferi

Last night one of our former company's customer called me and need help to recover their hacked website, 

First of all, I install the Hacked module, and check the changed files and recover them, then looking and cleansing some backdoor files which their job is to inject codes for external codes(most of the time, js files to traffic hijacking) to the website.

 

Read More

Drupal entity API cheat sheet

Posted on Sat, 07/21/2018 - 08:07 by yuseferi

As I've explained Short trip on Entity API in Drupal 8  Entity is the most important thing in Drupal 8, Almost, everything is Entity. So for a Drupal developer, it should be good to have a cheat sheet of Entity API instead of googling every time he/she need something, and of course, after a while, they saved in the long-term memory of Developer.

Let's jump into summarized Drupal 8 Entity API.

Read More

What's new in Drupal 8.5

Posted on Wed, 02/07/2018 - 10:18 by yuseferi

 

It's long time Drupal 8 has been released, it's in the middle of the way but it's going to get matured. Drupal 8.5 is going to release on  March 7, 2018. good features are going to released, significant improvements. you can the list of them Drupal Core RoadMap(8.5 + 8.6) 

 

Read More

How to write custom Twig filter in Drupal 8

Posted on Tue, 01/09/2018 - 23:54 by yuseferi

Twig is one of the  good template engines which is provided by SensioLabs, It’s syntax originates from Jinja and Django template, it’s Secure, Flexible and Fast : 

Twig is a modern template engine for PHP

• Fast: Twig compiles templates down to plain optimized PHP code. The overhead compared to regular PHP code was reduced to the very minimum.

Read More

Create Multi Step Form in Drupal 8

Posted on Wed, 06/28/2017 - 10:10 by yuseferi

Creating a multistep form  was not straightforward in Drupal 7, although there were some solutions, like “mforms”,” multistep” and  apparent solution by show/hiding fields by “Field Group” module  but Drupal Developers have struggled to create MultiStep Form,   In this article I’ll try to describe how we can create  MultiStop Form in Drupal 8,it’s not hard as much as it was in Drupal 7, Drupal 8 makes it easy for us, stay with me.

 

Read More