PHP 클래스 HeadModule, vanilla

상속: extends Module
파일 보기 프로젝트 열기: vanilla/vanilla 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_Subtitle A string to be concatenated with $this->_Title.
$_Title The main text for the "title" tag in the head.
$_TitleDivider string to be concatenated with $this->_Title if there is also a $this->_Subtitle string being concatenated.

공개 메소드들

메소드 설명
__construct ( string $Sender = '' )
addCss ( string $HRef, string $Media = '', boolean $AddVersion = true, array $Options = null ) Adds a "link" tag to the head containing a reference to a stylesheet.
addRss ( $HRef, $Title )
addScript ( string $Src, string $Type = 'text/javascript', boolean $AddVersion = true, mixed $Options = [] ) Adds a "script" tag to the head.
addString ( $String ) Adds a string to the collection of strings to be inserted into the head.
addTag ( $Tag, $Properties, $Content = null, $Index = null ) Adds a new tag to the head.
assetTarget ( ) : string
clearCSS ( ) Removes any added stylesheets from the head.
clearScripts ( ) Removes any script include tags from the head.
clearTag ( $Tag, $Property = '', $Value = '' ) Removes any tags with the specified $Tag, $Property, and $Value.
getStrings ( ) Return all strings.
getTags ( $RequestedType = '' ) Return all Tags of the specified type (or all tags).
setFavIcon ( $HRef ) Sets the favicon location.
setSubtitle ( string $subtitle = '' ) Sets the subtitle.
setTitleDivider ( string $titleDivider = ' — ' ) Sets the title divider.
tagCmp ( $A, $B ) : integer
tags ( array $Value = null ) Gets or sets the tags collection.
title ( string $Title = '', boolean $NoSubtitle = false ) : mixed | string Gets/sets the modules title.
toString ( ) Render the entire head module.

메소드 상세

__construct() 공개 메소드

public __construct ( string $Sender = '' )
$Sender string

addCss() 공개 메소드

Adds a "link" tag to the head containing a reference to a stylesheet.
public addCss ( string $HRef, string $Media = '', boolean $AddVersion = true, array $Options = null )
$HRef string Location of the stylesheet relative to the web root (if an absolute path with http:// is provided, it will use the HRef as provided). ie. /themes/default/css/layout.css or http://url.com/layout.css
$Media string Type media for the stylesheet. ie. "screen", "print", etc.
$AddVersion boolean Whether to append version number as query string.
$Options array Additional properties to pass to AddTag, e.g. 'ie' => 'lt IE 7';

addRss() 공개 메소드

public addRss ( $HRef, $Title )
$HRef
$Title

addScript() 공개 메소드

Adds a "script" tag to the head.
public addScript ( string $Src, string $Type = 'text/javascript', boolean $AddVersion = true, mixed $Options = [] )
$Src string The location of the script relative to the web root. ie. "/js/jquery.js"
$Type string The type of script being added. ie. "text/javascript"
$AddVersion boolean Whether to append version number as query string.
$Options mixed Additional options to add to the tag. The following values are accepted: - numeric: This will be the script's sort. - string: This will hint the script (inline will inline the file in the page. - array: An array of options (ex. sort, hint, version).

addString() 공개 메소드

Adds a string to the collection of strings to be inserted into the head.
public addString ( $String )

addTag() 공개 메소드

Adds a new tag to the head.
public addTag ( $Tag, $Properties, $Content = null, $Index = null )

assetTarget() 공개 메소드

public assetTarget ( ) : string
리턴 string

clearCSS() 공개 메소드

Removes any added stylesheets from the head.
public clearCSS ( )

clearScripts() 공개 메소드

Removes any script include tags from the head.
public clearScripts ( )

clearTag() 공개 메소드

Only $Tag is required.
public clearTag ( $Tag, $Property = '', $Value = '' )

getStrings() 공개 메소드

Return all strings.
public getStrings ( )

getTags() 공개 메소드

Return all Tags of the specified type (or all tags).
public getTags ( $RequestedType = '' )

setFavIcon() 공개 메소드

Sets the favicon location.
public setFavIcon ( $HRef )

setSubtitle() 공개 메소드

Sets the subtitle.
public setSubtitle ( string $subtitle = '' )
$subtitle string The subtitle which should be displayed in the title.

setTitleDivider() 공개 메소드

This is the string that is used to concatenate title and subtitle. Defaults to ' — '.
public setTitleDivider ( string $titleDivider = ' — ' )
$titleDivider string The string that concats title and subtitle.

tagCmp() 공개 정적인 메소드

public static tagCmp ( $A, $B ) : integer
$A
$B
리턴 integer

tags() 공개 메소드

Gets or sets the tags collection.
public tags ( array $Value = null )
$Value array .

title() 공개 메소드

Gets/sets the modules title.
public title ( string $Title = '', boolean $NoSubtitle = false ) : mixed | string
$Title string
$NoSubtitle boolean
리턴 mixed | string

toString() 공개 메소드

Render the entire head module.
public toString ( )

프로퍼티 상세

$_Subtitle 보호되어 있는 프로퍼티

A string to be concatenated with $this->_Title.
protected $_Subtitle

$_Title 보호되어 있는 프로퍼티

The main text for the "title" tag in the head.
protected $_Title

$_TitleDivider 보호되어 있는 프로퍼티

string to be concatenated with $this->_Title if there is also a $this->_Subtitle string being concatenated.
protected $_TitleDivider