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

Drupal example source code file (requirements1_test.install)

This example Drupal source code file (requirements1_test.install) 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

array, failed, function, get_t, install, language, phase, php, requirement_error, requirements, requirements1_test_requirements, return, test, title

The requirements1_test.install Drupal example source code

<?php
// $Id: requirements1_test.install,v 1.1 2010/05/26 07:31:46 dries Exp $

/**
 * Implements hook_requirements().
 */
function requirements1_test_requirements($phase) {
  $requirements = array();
  // Ensure translations don't break at install time.
  $t = get_t();

  // Always fails requirements.
  if ('install' == $phase) {
    $requirements['requirements1_test'] = array(
      'title' => $t('Requirements 1 Test'),
      'severity' => REQUIREMENT_ERROR,
      'description' => $t('Requirements 1 Test failed requirements.'),
    );
  }

  return $requirements;
}

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal requirements1_test.install 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.