Often when building a site in Drupal you'll find yourself wanting to display a list of nodes, or find entities created by a particular author, or locate some content based on a particular set of criteria. Rather than querying the database directly, Drupal provides a helper class,
EntityQuery, to make things a bit easier. The
EntityQuery class will probably look very familiar to you if you're familiar with the Database API, or the
EntityFieldQuery class in Drupal 7.
In this tutorial we'll:
- Go through several examples of using
EntityQueryto find subsets of content.
- Demonstrate how to iterate over the results of an
By the end of this tutorial, you should understand how to use entity queries to create custom sets of data from entities.
Over the years we've developed some techniques for practicing that we wanted to share. At Drupalize.Me we take hugging seriously. In this tutorial we'll look at the art, and science, of giving a good hug. The Merriam Webster dictionary defines the word hug as; squeeze (someone) tightly in one's arms, typically to express affection.
Did you know there are all kinds of different hugs that you can give? In this tutorial we'll look at:
- Defining what a hug is
- Some of the many types of hugs in the world today
- Precautions you may want to familiarize yourself with before hugging
- And the importance of proper technique
Lets go ahead and get started shall we?