Deleting a Cookie in JavaScript by name. LAKHAN GEHARWAR November 28, 2024 Set-Cookie function set_cookie(name, value) { document.cookie = name +'='+ value +'; Path=/;'; } Delete-Cookie funct... Continue Reading
Cron run every which is set the time. LAKHAN GEHARWAR July 01, 2024 /** * Implements hook_cron(). */ function sso_user_cron () { //$current_time = time() + 6*60*60; 6hr total=21600,12hr total=43200,24h... Continue Reading
Drupal LAKHAN GEHARWAR April 09, 2024 https://www.metaltoad.com/help/top-20-drupal-tips Continue Reading
Drupal 8 Entity API cheat sheet LAKHAN GEHARWAR April 09, 2024if you've already read the official Drupal 8 Entity API documentation and you want more examples, here's a handy cheat sheet: The e... Continue Reading
How to created the services in drupal 10 LAKHAN GEHARWAR August 17, 2023 Step 1. Create service file and add the class as service Example : mymodule.services.yml services: mymodule.custom_services: class: D... Continue Reading
Drupal coding standards check with PHPCS (phpcodesniffer) in Drupal 9 LAKHAN GEHARWAR July 13, 2023 Step 1: We need to run the command on drupal root folder composer require drupal/coder Step 2:- after install is done you can check the php... Continue Reading
Update drupal 8 to 9 and latest version LAKHAN GEHARWAR May 27, 2023 Step 1: Change the version in our composer.json file and run composer update. Output:- Composer lock file changes the relevant content. Continue Reading
How to migrate Embedded Data in drupal 9 LAKHAN GEHARWAR March 06, 2023 Step 1: We need to install the Migrate Plus module and enable it. Step 2: Created the vocabulary and the name of the vocabulary " Migr... Continue Reading
Conditional form fields visibility with form states.(Using #states visible) LAKHAN GEHARWAR October 02, 2022 Step 1:- Use the #states in a custom form. created some important files for custom forms like: Creating a custom module in the custo... Continue Reading
Working Hook .theme LAKHAN GEHARWAR September 04, 2022 Project Working This is first <?php use Drupal\block\Entity\Block; /** * @file * Functions to support theming in the hook theme. */ ... Continue Reading