Check your version

This video covers a topic in Drupal 7 which may or may not be the version you're using. We're keeping this tutorial online as a courtesy to users of Drupal 7, but we consider it archived.

Alternate resources: 

Expose Your Entity to Views

Video loading...

Transcript language code: 

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:06
    In this lesson we'll take a look at how easy it is to provide view support for our custom entity.
  • 0:11
    Luckily the Entity API contrib module comes with a Views controller class
  • 0:14
    we can use to get a lot of this information basically for free.
  • 0:17
    We'll take a look at that controller class and see how we can customize it if we need to provide extra support
  • 0:22
    for our entity's properties.
  • 0:27
    Now that our video entity is fieldable, it's almost comically easy to add support for views,
  • 0:31
    thanks to the Entity API contrib module.
  • 0:34
    Let's take a look at how the contrib module helps us do this.
  • 0:37
    Inside the contrib module there's a directory called Views.
  • 0:40
    Inside of that,

Expose Your Entity to Views


This lesson takes a look at exposing the data in our entities to views. Lucky for us the entity API handles a lot of this for us. We’ll take a look at what we get for free, using the EntityDefaultViewsController class provided by Entity API module. We'll also discuss ways that we can customize this controller, which we'll tackle in a later lesson.

Log in or sign up to download companion files.

Additional resources:
There are no resources for this video. If you believe there should be, please contact us.