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
150
results
Andrew Fletcher
•
For an introduction into setting up RESTful hal+json refer to the set-up documentation.
PATCH command
Following on from the GET command, to patch a node to the site (currently staging) is quite quick. To be able to PATCH an article, the member needs to have authority to do so. All members can update their own content. However, they cannot update any one else's content.
Outline of the details required to make a...
Andrew Fletcher
•
To POST an image is similar to the other posts mentioned on this site....
Andrew Fletcher
•
To sort through a multidimensional array seems to be a function that I...
Andrew Fletcher
•
For an introduction to setting up RESTful hal+json refer to the set-up...
Andrew Fletcher
•
The user API, was originally created under the General...
Andrew Fletcher
•
The development version of the app database is held on the staging site. Note all development and testing will be completed on the staging site.
Drupal 9 uses:
HAL : Serializes entities using Hypertext Application Language.
RESTful Web Services
For testing purposes you can use either of the following Chrome extensions:
Postman;
DHC
Using Postman to perform a GET command for a node
The get string is https:/{your-site.com}/node/<nid>?_format=hal_json, where the...
Andrew Fletcher
•
The user parameters provides details about a specific user based...
Andrew Fletcher
•
Adding git tag to your actions.
The regular process that I work to is
git add...
Andrew Fletcher
•
Attempting to update the database, irrespective whether I run update.php or...
Andrew Fletcher
•
Do you want to know how to add a node alias in a twig file? Rather than do...
Andrew Fletcher
•
If you edit a Drupal contrib module, the next time the module is updated those edits will be wiped. So they are not lost there are a couple of options for you to consider:
Are the edits worth the contributing to the community? Yes, you can fork the repo and add the changes for the developer(s) to review; or
Create a patch file
Creating a patch file
The process:
Add the files you want to see in the diff. Remembering to only add untracked files.
git stash && git...
Andrew Fletcher
•
As a web developer, you will most likely need to run local copies of a bunch of...
Andrew Fletcher
•
The cache system in Drupal 9 delivers the API with the elements required for...
Andrew Fletcher
•
How to get the current user or load a user using a uid value.
$current_user =...
Andrew Fletcher
•
Running a few SEO and performance tests and I discovered that the site logo...