You are here

function _js_injector_rule_uri in JS injector 8

Same name and namespace in other branches
  1. 7.2 js_injector.module \_js_injector_rule_uri()
  2. 7 js_injector.module \_js_injector_rule_uri()

Return the URI for a given rule name.

Parameters

$id: The js_injector rule machine name

3 calls to _js_injector_rule_uri()
RuleDeleteForm::submit in lib/Drupal/js_injector/Form/RuleDeleteForm.php
RuleFormController::save in lib/Drupal/js_injector/RuleFormController.php
_js_injector_rule_path in ./js_injector.module
Helper function to get file path for a rule. This will get the path relative to DRUPAL_ROOT, as in 'sites/default/files/js_injector/js_[id].js'.

File

./js_injector.module, line 153
js_injector.module

Code

function _js_injector_rule_uri($id) {
  if (!empty($id)) {
    return file_default_scheme() . '://js_injector/js_' . $id . '.js';
  }
}