Skip to content

Instantly share code, notes, and snippets.

View isalmanhaider's full-sized avatar
👨‍💻
Exploring Drupal 10/11, Symphony 7, PHP 8.3, GenAI

Salman Haider isalmanhaider

👨‍💻
Exploring Drupal 10/11, Symphony 7, PHP 8.3, GenAI
View GitHub Profile
@isalmanhaider
isalmanhaider / delete_node.php
Created July 26, 2024 13:02
delete node from content and group_content
<?php
use Drupal\Core\DrupalKernel;
use Symfony\Component\HttpFoundation\Request;
use Drupal\node\Entity\Node;
// Bootstrap Drupal.
$autoloader = require_once __DIR__ . '/vendor/autoload.php';
$kernel = DrupalKernel::createFromRequest(Request::createFromGlobals(), $autoloader, 'prod');
$kernel->boot();
<?php
/**
* @file
* Script to help cleanup the not existing permissions from your roles.
*
* @code
* drush scr clean_permissions.php
* drush -y cex
* @endcode
*