drupal_function_exists

  1. drupal
    1. drupal7
Versionen
drupal7 drupal_function_exists($function)

Confirm that a function is available.

If the function is already available, this function does nothing. If the function is not available, it tries to load the file where the function lives. If the file is not available, it returns false, so that it can be used as a drop-in replacement for function_exists().

Übergabeparameter

$function The name of the function to check or load.

Rückgabewert

TRUE if the function is now available, FALSE otherwise.

Verwandte Themen

▾ 46 functions call drupal_function_exists()

aggregator_refresh in modules/aggregator/aggregator.module
Checks a news feed for new items.
BatchAPIPercentagesTestCase::testBatchAPIPercentages in modules/simpletest/tests/batch.test
Test the _batch_api_percentage() function with the data stored in the testCases class variable.
BlogAPITestCase::setUp in modules/blogapi/blogapi.test
drupal_get_schema in includes/bootstrap.inc
Get the schema definition of a table, or the whole database schema.
drupal_mail in includes/mail.inc
Compose and optionally send an e-mail message.
drupal_prepare_form in includes/form.inc
Prepares a structured form array by adding required elements, executing any hook_form_alter functions, and optionally inserting a validation token to prevent tampering.
drupal_render in includes/common.inc
Renders HTML given a structured array tree.
drupal_retrieve_form in includes/form.inc
Retrieves the structured array that defines a given form.
field_add_more_submit in modules/field/field.form.inc
Submit handler to add more choices to a field form. This handler is used when JavaScript is not available. It makes changes to the form state and the entire form is rebuilt during the page reload.
field_default_form in modules/field/field.form.inc
Create a separate form element for each field.
field_default_form_errors in modules/field/field.form.inc
Transfer field-level validation errors to widgets.
field_default_insert in modules/field/field.default.inc
Default field 'insert' operation.
field_multiple_value_form in modules/field/field.form.inc
Special handling to create form elements for multiple values.
field_view_field in modules/field/field.module
Return a single field, fully themed with label and multiple values.
form_ahah_callback in includes/form.inc
Menu callback for AHAH callbacks through the #ahah['callback'] FAPI property.
form_builder in includes/form.inc
Walk through the structured form array, adding any required properties to each element and mapping the incoming $_POST data to the proper elements. Also, execute any #process handlers attached to a specific element.
form_execute_handlers in includes/form.inc
A helper function used to execute custom validation and submission handlers for a given form. Button-specific handlers are checked first. If none exist, the function falls back to form-level handlers.
GraphUnitTest::testDepthFirstSearch in modules/simpletest/tests/graph.test
Test depth-first-search features.
ImageToolkitGdTestCase::testManipulations in modules/simpletest/tests/image.test
Since PHP can't visually check that our images have been manipulated properly, build a list of expected color values for each of the corners and the expected height and widths for the final images.
image_gd_desaturate in modules/system/image.gd.inc
Convert an image resource to grayscale.
image_gd_rotate in modules/system/image.gd.inc
Rotate an image the given number of degrees.
image_get_toolkit in includes/image.inc
Retrieve the name of the currently used toolkit.
image_toolkit_invoke in includes/image.inc
Invokes the given method using the currently selected toolkit.
list_allowed_values in modules/field/modules/list/list.module
Create an array of the allowed values for this field.
menu_execute_active_handler in includes/menu.inc
Execute the page callback associated with the current path
module_enable in includes/module.inc
Enable a given list of modules.
module_hook in includes/module.inc
Determine whether a module implements a hook.
module_implements in includes/module.inc
Determine which modules are implementing a hook.
module_invoke_all in includes/module.inc
Invoke a hook in all enabled modules that implement it.
module_load_include in includes/module.inc
Load a module include file.
system_actions_configure_validate in modules/system/system.module
Validate system_actions_configure form submissions.
system_image_toolkits in modules/system/system.module
Implementation of hook_image_toolkits().
system_image_toolkit_settings in modules/system/system.admin.inc
Form builder; Configure site image toolkit usage.
template_preprocess_node in modules/node/node.module
Process variables for node.tpl.php
theme in includes/theme.inc
Generate the themed output.
XMLRPCMessagesTestCase::setUp in modules/simpletest/tests/xmlrpc.test
XMLRPCValidator1IncTestCase::setUp in modules/simpletest/tests/xmlrpc.test
xmlrpc_server_call in includes/xmlrpcs.inc
Dispatch the request and any parameters to the appropriate handler.
_field_get_formatter in modules/field/field.info.inc
Return valid formatter type and settings.
_field_invoke in modules/field/field.attach.inc
Invoke a field hook.
_field_invoke_multiple in modules/field/field.attach.inc
Invoke a field operation across fields on multiple objects.
_form_validate in includes/form.inc
Performs validation on form elements. First ensures required fields are completed, #maxlength is not exceeded, and selected options were in the list of options given to the user. Then calls user-defined validators.
_init_theme in includes/theme.inc
Initialize the theme system given already loaded information. This function is useful to initialize a theme when no database is present.
_menu_check_access in includes/menu.inc
Check access to a menu item using the access callback
_menu_item_localize in includes/menu.inc
Localize the router item title using t() or another callback.
_menu_router_build in includes/menu.inc
Helper function to build the router table based on the data from hook_menu.

Code

includes/bootstrap.inc, line 1676

<?php
function drupal_function_exists($function) {
  static $checked = array();

  if (defined('MAINTENANCE_MODE')) {
    return function_exists($function);
  }

  if (isset($checked[$function])) {
    return $checked[$function];
  }
  $checked[$function] = FALSE;

  if (function_exists($function)) {
    $checked[$function] = TRUE;
    return TRUE;
  }

  $checked[$function] = _registry_check_code('function', $function);

  return $checked[$function];
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen