By admin , 19 November, 2025 Run Drupal Gitlab CI locally Install gitlab-ci-localAdd alias Tags gitlab ci-cd phpunit
By admin , 11 November, 2025 Hide comment field from node teasers in functional tests /** @var \Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_form_display */ $entity_form_display = \Drupal::service('entity_display.repository'); $display = $entity_form_display->getViewDisplay('node', 'blog', 'teaser'); $display->removeComponent('comment_forum'); $display->save(); Tags comment field phpunit
By admin , 18 October, 2025 Kernel test example for TwigExtension function <?php declare(strict_types=1); namespace Drupal\Tests\MYMODULE\Kernel; use Drupal\Core\Render\Markup; Tags tests twig
By admin , 18 October, 2025 Views: two contextual filters with "OR" By default views is using "AND" Tags views
By admin , 18 October, 2025 Docksal: access to local network (connect to LM Studio) Add to project docksal.yml Tags docker docksal
By admin , 17 October, 2025 Drupal.org Gitlab: pulling in new branches from an issue fork's parent You can then pull the latest branches from the parent origin, and push them to the issue-fork origin. For instance, to add Drupal Core 10.1.x, you could do this: Tags git drupal.org
By admin , 7 October, 2025 Append custom field to views programmatically /** * Implements hook_views_pre_view(). */ function MYMODULE_views_pre_view(ViewExecutable $view) { if ($view->id() === 'VIEWNAME') { $display_handler = $view->getDisplay(); $fields = $display_handler->getOption('fields'); $fields['blacklis Tags views field
By admin , 7 October, 2025 Simple views custom field plugin Add/** * {@inheritdoc} */ public function query() {}if you don't use any queriesUse 'views' table name ($data['views']) Tags views field
By admin , 22 September, 2025 Get client IP address $request_stack = \Drupal::service('request_stack'); $request = $request_stack->getCurrentRequest(); $ip_address = $request->getClientIp(); Tags request