Skip to content
LaCodon edited this page Oct 14, 2016 · 4 revisions

namespace Famework\View

Contents

Important public Methods

addCSS

Add CSS to the output HTML (inside the <head> tag).
Call this in the Action.

void addCSS(string $css [, string $media = 'screen'])
Parameter Purpose
css The URL to the .css file or plain CSS
media The media attribute of the <link> tag

addJS

Add JavaScript to the output HTML (inside the <head> tag).
Call this in the Action.

void addJS(string $js)
Parameter Purpose
js The URL to the .js file

addMeta

Add a <meta> tag to the output HTML (inside the <head> tag).
Call this in the Action.

void addMeta(string $name, string $content)
Parameter Purpose
name Value of the name attribute
content Value of the content attribute

addHeadElement

Add html tag to the output HTML (inside the <head> tag).
Call this in the Action.

void addHeadElement(string $elementHtml)
Parameter Purpose
elementHtml The html code like <link href="[...]">

setLang

Sets the html lang attribute.

void setLang(string $lang)
Parameter Purpose
lang The lang attribute

turnLayoutOff

Turn the HTML frame completely off.
Call this in the Action.

void turnLayoutOff()

ignoreView

Don't call/execute the view.php script. Call this in the Action.

void ignoreView()

title

Add a title tag
Call this in the Action.

void title(string $string)
Parameter Purpose
string The title

description

Add a meta description tag
Call this in the Action.

void description(string $string)
Parameter Purpose
string The description

setFrameController

Use this function if you want to generalise some parts inside the <body> tag of your output HTML.
Call this in the init function of the Controller or in the Action.

void setFrameController(\Famework\View\Famework_View_Frame_Controller $object)
Parameter Purpose
object A Famework_View_Frame_Controller object
Clone this wiki locally