You are here

function js_injector_rule_load in JS injector 8

Same name and namespace in other branches
  1. 7.2 js_injector.module \js_injector_rule_load()

Loads the data for a js_injector rule.

Parameters

$id: The machine-name of the js_injector rule to load.

Return value

object If the js_injector rule set exists, an object containing the following properties:

  • 'id': The internal name of the rule.
  • 'label': The title of the rule.

If the js_injector rule does not exist, the function returns NULL.

1 string reference to 'js_injector_rule_load'
RuleFormController::form in lib/Drupal/js_injector/RuleFormController.php

File

./js_injector.module, line 50
js_injector.module

Code

function js_injector_rule_load($id) {
  return entity_load('js_injector_rule', $id);
}