-
Notifications
You must be signed in to change notification settings - Fork 0
Famework_View
namespace Famework\View
- addCSS()
- addJS()
- addMeta()
- addHeadElement()
- setLang()
- turnLayoutOff()
- ignoreView()
- title()
- description()
- setFrameController()
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 |
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 |
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 |
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="[...]">
|
Sets the html lang attribute.
void setLang(string $lang)
Parameter | Purpose |
---|---|
lang | The lang attribute |
Turn the HTML frame completely off.
Call this in the Action.
void turnLayoutOff()
Don't call/execute the view.php script. Call this in the Action.
void ignoreView()
Add a title tag
Call this in the Action.
void title(string $string)
Parameter | Purpose |
---|---|
string | The title |
Add a meta description tag
Call this in the Action.
void description(string $string)
Parameter | Purpose |
---|---|
string | The description |
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 |
- Home
- Getting Started
- Server Setup
- Configuration Files
- Application Structure
- Classes