home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (entity_cache_test.module)

This example Drupal source code file (entity_cache_test.module) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

entity_cache_test_watchdog, function, if, info, installed, log_entry, module, php, system

The entity_cache_test.module Drupal example source code

// $Id: entity_cache_test.module,v 1.2 2010/10/15 04:44:08 webchick Exp $

 * @file
 * Helper module for entity cache tests.

 * Implements hook_watchdog().
 * This hook is called during module_enable() and since this hook
 * implementation is invoked, we have to expect that this module and dependent
 * modules have been properly installed already. So we expect to be able to
 * retrieve the entity information that has been registered by the required
 * dependency module.
 * @see EnableDisableTestCase::testEntityCache()
 * @see entity_cache_test_dependency_entity_info()
function entity_cache_test_watchdog($log_entry) {
  if ($log_entry['type'] == 'system' && $log_entry['message'] == '%module module installed.') {
    $info = entity_get_info('entity_cache_test');
    // Store the information in a system variable to analyze it later in the
    // test case.
    variable_set('entity_cache_test', $info);

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal entity_cache_test.module source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.