down arrowMenu

UNI Webtools: Resources for Web Developers

Deeson: Extending EntityDrupalWrapper

Posted on Friday, November 28th, 2014 by Anonymous

We'd all like to be writing better OO code with Drupal 7, wouldn't we?

It's always been a best practice of ours to use the entity_metadata_wrapper() function when programming the additional logic that inevitably comes when constructing complex content types. But a pain point of this is that the code usually ends up in one hook_ implementation or another and any shared code tends to get arranged into functions in the .module file.

Deeson: Extending EntityDrupalWrapper

Posted on Friday, November 28th, 2014 by Anonymous

We'd all like to be writing better OO code with Drupal 7, wouldn't we?

It's always been a best practice of ours to use the entity_metadata_wrapper() function when programming the additional logic that inevitably comes when constructing complex content types. But a pain point of this is that the code usually ends up in one hook_ implementation or another and any shared code tends to get arranged into functions in the .module file.

Pages

Subscribe to UNI Webtools: Resources for Web Developers RSS