developer resources
Codebales holds an ever growing number of solutions to problems that we have experienced in our day to day code writing
Selected filter
5
results
Andrew Fletcher
•
This code is from Drupal 9 back-end for a React front-end via REST API.
Working through the output for recently viewed pages... the code structure:
<?php
namespace Drupal\custom\Plugin\GetData\paragraph;
use Drupal\custom\Plugin\GetData\ContentBase;
use Drupal\custom\Plugin\GetData\ParagraphTrait;
use Drupal\node\Entity\Node;
/**
* Provides Recent view pages data.
*
* @GetData(
* id = "recent_view_pages",
* title = @Translation("Recent view pages Data"),
* )
*/
class...
Andrew Fletcher
•
Updating to PHP 8.1, I found this interesting code stop...
Deprecated function:...
Andrew Fletcher
•
You would have come across a URL string that appears...
Andrew Fletcher
•
Creating a message log using Drupal watchdog.
Simple log
// Logs a...
Andrew Fletcher
•
A bug bear that I have had for a while with Drupal content is how come the...