Skip to main content

Posts

New technology , Features

New Drupal 8 Module Travis CI Integration : Unit Test With Codes Cloud AWS Chatbot API All Example module d8 : It covers everything Field API :  https://www.drupal.org/docs/8/creating-custom-modules/creating-custom-field-types-widgets-and-formatters https://www.drupal.org/docs/8/creating-custom-modules/creating-custom-field-types-widgets-and-formatters/create-a-custom custom Field widget custom field formater Automated cron in d8 Search API's in d8 Render API Design Pattern : https://www.youtube.com/watch?v=wlfslHpiS4I&list=PLY-mQxqgVZ1wrwNa86_smHF8TTS34CNW4&index=21 Best Way ti use Composer with git:  Cache in Drupal 8 With tutorial :  Create patches & apply patches git : Postman API demostration

Basic Vim commands in Linux

Basic Vim commands :help [keyword]  - Performs a search of help documentation for whatever keyword you enter :e [file]  - Opens a file, where [file] is the name of the file you want opened :w  - Saves the file you are working on :w [filename]  - Allows you to save your file with the name you’ve defined :wq  - Save your file and close Vim :q!  - Quit without first saving the file you were working on

Git Tutorial

Steps To Configure new folder git setup :   git init git config --global user.name "USERNAME" git config --global user.email "GITMAILID" git remote add origin https://github.com/Dharmend/multisite.git git config core.filemode false Git Checkout performs the three types of operations :   1 – Checkout files , ( git chekout aa.txt ) 2 – Checkout branch , ( git checkout “branch name” ) 3 – Checkout commits , ( git checkout k9s7hjkh76 ) git diff :     Command : git diff To show the difference between last commit file and current change file,if you add file in staging area then it will not show the diff, to see the diff use git diff --cached git checkout vs git revert vs git reset :     git checkout - download the updated code of the branch and file while HEAD is not changed While git reset, moves both the HEAD and branch refs to the specified commit git revert- The git revert command is a forward-moving undo operat...

MYSQL Table Joining

leftJoin ==  LEFT OUTER JOIN join == innerjoin right join == RIGHT OUTER JOIN Print raw SQL queries for debugging $connection = \ Drupal :: service( ' database ' ); $query = $connection -> select( ' node ' , ' node ' ); $query -> fields( ' node ' , [ ' nid ' ]) -> condition( ' node.type ' , ' page ' ) // Debug. dump( $query -> __toString()); Which Table is in Left and whilch is in Right Lets suppose there are two tables, emp and deptt  SELECT emp.name,emp.no,d_name FROM emp left outer join deptt on (emp.dept_no = dept.dept_no) it left Join , and in left side table is emp and right side table is deptt. When we perform the left join it return the emp table. Type of Joins :  1  - Inner join (Natural join)(join)       1.1 - Natural join         1.2 - Conditional join or theta join        1.3 - Equi join 2 - Outer join:  ...

SQL Query Interview Questions

/* Return Employee record With highest Salary */ SELECT * from employee where salary = (SELECT Max(salary) from employee); /* Select highest salary in employee table */ SELECT Max(salary) from employee; /* Select 2nd highest salary from employee */ SELECT Max(salary) from employee where salary Not in (SELECT Max(salary) from employee) /* select Range of employee based on id */ SELECT * FROM  employee where employee_id between 2003 and 2008

Migration Part I : Drupal to Drupal migration

Drupal 8 core provides support for Drupal-to-Drupal migrations.  it will allow you to migrate your content from previous versions to Drupal 8. Core: Migrate Migrate Drupal Contributed: Migrate Upgrade (drupal.org/project/migrate_upgrade) Migrate Tools (drupal.org/project/migrate_tools) Migrate Plus (drupal.org/project/migrate_plus) Step 1 - goto your drupal 8 site setting.php and add the drupal 7 db setting in this file, so default drupal 8 db settings comes with  $database['default']['default']  copy this and make new key named as  $database['upgrade']['default'] like below $databases [ 'upgrade' ] [ 'default' ] = array ( 'database' = > 'dbname' , 'username' = > 'dbuser' , 'password' = > 'dbpass' , 'prefix' = > '' , 'host' = > 'localhost' , 'port' = > '3306' , 'n...

Composer With Drupal 8

Steps to install the d8 site with composer: 1 - composer create-project drupal/recommended-project drupal8-pattern --no-interaction 2 - Add the permission /sites/default/files -- 777 and then visit the project from the browser and install, Composer.json : To start using Composer in your project, all you need is a composer.json file. This file describes the dependencies of your project and may contain other metadata as well. Installing dependencies : php composer.phar install When you run this command, one of two things may happen: with composer.lock or without composer.lock Installing without composer.lock If you have never run the command before and there is also no composer.lock file present, Composer simply resolves all dependencies listed in your composer.json file and downloads the latest version of their files into the vendor directory in your project. (The vendor directory is the conventional location for all third-party c...