Code from Programming Drupal Entities