Conventions used
There are a number of text conventions used throughout this book.
Code in text
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “Create a *.services.yml
file within the root directory of the module.”
A block of code is set as follows:
use Drupal\user\Entity\User; $user = User::load(\Drupal::currentUser()->id());
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
namespace Drupal\my_module\Service;
Any command-line input or output is written as follows:
$ mkdir css $ cd css
Tips or important notes
Appear like this.