\HeadJsBackend
Synopsis
class HeadJsBackend
extends Requirements_Backend
{
- // members
- public boolean $write_js_to_body = false;
- public static array $do_not_wrap = ;
- public array $callbacks = ;
- // methods
- public bool isBackendController()
- public static void doNotWrap()
- public static boolean getNamedFiles()
- public static string getCdnSource()
- public static string getJavascriptSource()
- public static string getHeadJsUrl()
- public void add_callback()
- public void remove_callback()
- public void get_callback()
- public void add_dependency()
- public string includeInHTML()
Hierarchy
Extends
- Requirements_Backend
Tasks
Line | Task |
---|---|
125+ | Calculate $prefix properly |
186 | store all css files in arrays with media param as the key, then do a headjs test for each mediaparam |
Members
public
- $callbacks
—
array
Store all relevant callbacks for onLoad of files here - $do_not_wrap
- $write_js_to_body
Methods
public
- add_callback()
- add_dependency() — Add a dependency for a file or path
- doNotWrap() — Do not wrap in head.ready a given customScript
- getCdnSource() — Get the CDN source for headjs
- getHeadJsUrl() — Get the head js url
- getJavascriptSource() — Get the local filesystem source
- getNamedFiles() — Show the name of files in includes
- get_callback() — Get all the callbacks associated with $fileOrID
- includeInHTML() — Update the given HTML content with the appropriate include tags for the registered requirements. Needs to receive a valid HTML/XHTML template in the $content parameter, including a <head> tag. The requirements will insert before the closing <head> tag automatically.
- isBackendController() — Helper method to know if we are in the admin
- remove_callback() — Remove all the callbacks associated with $fileOrID