-
Notifications
You must be signed in to change notification settings - Fork 34
classes_base_htmlpage.class
Base class for all Html pages. Will perform all rendering and collect js, css, meta and more.
Namespace: ScavixWDF\Base
Implements: ICallable
Extends: Template » Renderable
Subclasses: SysAdmin
Adds a link tag (type=css) to the page Like this: <link rel='stylesheet' type='text/css' href='$src'/>
Definition: public function addCss($src, $key)
Returns: HtmlPage $this
Parameters:
-
string $src
The src attribute -
string $key
Optional data-key attribute for the link tag
Adds code to the document ready event.
Definition: public function addDocReady($js_code, $jq_wrapped=true)
Returns: HtmlPage $this
Parameters:
-
mixed $js_code
JS code as string or array -
bool $jq_wrapped
If true adds the code to the ready event handler, else will be added inline into the head script element
Adds raw code to the header
Definition: public function addHeaderRaw($code, $pre=false)
Returns: HtmlPage $this
Parameters:
-
string $code
The raw code -
bool $pre
Should it be added before the standard css and js files in the header?
Adds a task to the InternetExplorer 'Jump List' See http://msdn.microsoft.com/en-us/library/ie/gg491725%28v=vs.85%29.aspx
Definition: public function AddIE9PinningTask($name, $url, $icon_url, $window_type)
Returns: HtmlPage $this
Parameters:
-
string $name
The task name that appears in the Jump List -
string $url
The address that is launched when the item is clicked -
string $icon_url
The icon resource that appears next to the task in the Jump List -
string $window_type
One of 'tab', 'self' or 'window'
Adds a script tag to the page Like this: <script type='text/javascript' src='$src'></script>
Definition: public function addJs($src, $key)
Returns: HtmlPage $this
Parameters:
-
string $src
The src attribute -
string $key
Optional data-key attribute for the script tag
Adds a link tag to the page Like this: <link rel='$rel' type='$type' title='$title' href='$href'/>
Definition: public function addLink($rel, $href, $type, $title)
Returns: HtmlPage $this
Parameters:
-
string $rel
The rel attribute -
string $href
The href attribute -
string $type
The type attribute -
string $title
The title attribute
Adds a meta tag to the page Like this <meta name='$name' content='$content' scheme='$scheme'/>
Definition: public function addMeta($name, $content, $scheme, $type)
Returns: HtmlPage $this
Parameters:
-
string $name
The name -
string $content
The content -
string $scheme
The scheme -
string $type
The meta-tags name ('name','http-equiv',...)
Adds polyfill to the rendered HTML page. This feature uses https://polyfill.io to magically make your website work in nearly every browser.
Definition: public static function AddPolyfills($pf)
Returns: void
Parameters:
-
array|string $pf
Requested polyfills
Sets InternetExplorer 'Pinned Site Metadata' See http://msdn.microsoft.com/en-us/library/ie/gg491732%28v=vs.85%29.aspx
Definition: public function SetIE9PinningData($application, $tooltip, $start_url, $button_color=false)
Returns: HtmlPage $this
Parameters:
-
string $application
See application-name -
string $tooltip
See msapplication-tooltip -
string $start_url
See msapplication-starturl -
string $button_color
See msapplication-navbutton-color
OVERRIDE Template::WdfRender
OVERRIDE Template::WdfRenderAsRoot
This is WDF constructor equivalent
Definition: public function __initialize($title, $body_class=false)
Returns: NOT DOCUMENTED
Parameters:
-
string $title
Page title -
string $body_class
Optional value for the class attribute of the <body> element