Drupal 8 Entity Cheat Sheet



This Drupal 8 Entity cheat sheet contains frequently used code examples, methods, classes and interfaces. It does not intent to be complete, but is made to help Drupal 8 developers a starting point in working with Entities and Entity Queries.

Use sudo command in OSX without a password

To use the sudo command in Terminal without having to enter your password each time, follow these steps:

1. Switch user to root. (How to enable the root user in OSX)

2. Enter this command:

chmod +w /etc/sudoers

That makes the /etc/sudoers file writable. Sometimes it can be read-only.

3. Open /etc/sudoers in nano, vi, or the text editor of your choice, and add this line at the bottom:

Enable the root user in OSX

To enable the root user in OSX using the GUI, follow these steps:

1. From the Apple menu select "System Preferences".

2. Click on the "Users & Groups" icon.

3. Click the lock and enter the credentials of an administrator account.

4. Click Login Options....

5. Click the ""Join..." button to the left of "Network Account Server" at the bottom.


Whether you're starting from scratch, need a redesign, or just need some refreshing and improvements on your site, I can help.