PHP 클래스 Frontend\Core\Engine\Header

..)
상속: extends Frontend\Core\Engine\Base\Object
파일 보기 프로젝트 열기: forkcms/forkcms 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Symfony\Component\HttpKernel\KernelInterface $kernel )
addCSS ( string $file, boolean $minify = true, boolean $addTimestamp = null ) Add a CSS file into the array
addJS ( string $file, boolean $minify = true, boolean $addTimestamp = null, integer $priorityGroup = self::PRIORITY_GROUP_DEFAULT ) Add a javascript file into the array
addJsData ( string $module, string $key, mixed $value ) Add data into the jsData
addLink ( array $attributes, boolean $overwrite = false, mixed $uniqueKeys = null ) Add link
addMetaData ( array $attributes, boolean $overwrite = false, mixed $uniqueKeys = null, mixed $additionalKey = null ) Add meta data
addMetaDescription ( string $value, boolean $overwrite = false ) Add meta-description, somewhat a shortcut for the addMetaData-method
addMetaKeywords ( string $value, boolean $overwrite = false ) Add meta-keywords, somewhat a shortcut for the addMetaData-method
addOpenGraphData ( string $key, string $value, boolean $overwrite = false ) Add Open Graph data
addOpenGraphImage ( string $image, boolean $overwrite = false, integer $width, integer $height ) Add Open Graph image
addRssLink ( string $title, string $link ) Add Rss link
extractOpenGraphImages ( string $content ) Extract images from content that can be added add Open Graph image
getCSSFiles ( ) : array Get all added CSS files
getJSFiles ( ) : array get all added javascript files
getLinks ( ) : array Get all links
getMeta ( ) : array Get meta
getMetaCustom ( ) : string Get the custom meta
getMetaValue ( string $attribute, string $attributeValue ) : array Get all attributes for meta tag specified by the attribute and the value for that attribute.
getPageTitle ( ) : string Get the page title
parse ( ) Parse the header into the template
setCanonicalUrl ( string $url ) Set the canonical URL
setMetaCustom ( string $meta ) Set the custom meta
setPageTitle ( string $value, boolean $overwrite = false ) Set the page title
setTwitterCard ( string $title, string $description, string $imageURL, string $cardType = 'summary', string $siteHandle = null, string $creatorHandle = null ) Set Twitter Card

비공개 메소드들

메소드 설명
cssSort ( array $cssFiles ) : array Sort function for CSS-files
minifyCSS ( string $file ) : string Minify a CSS-file
minifyJS ( string $file ) : string Minify a javascript-file
parseCSS ( ) Parse the CSS-files
parseCustomHeaderHTMLAndGoogleAnalytics ( ) Parse Google Analytics
parseFacebook ( ) Parse Facebook related header-data
parseJS ( ) Parse the JS-files
parseMetaAndLinks ( ) Parse the meta and link-tags
parseSeo ( ) Parse SEO specific data

메소드 상세

__construct() 공개 메소드

public __construct ( Symfony\Component\HttpKernel\KernelInterface $kernel )
$kernel Symfony\Component\HttpKernel\KernelInterface

addCSS() 공개 메소드

Add a CSS file into the array
public addCSS ( string $file, boolean $minify = true, boolean $addTimestamp = null )
$file string The path for the CSS-file that should be loaded.
$minify boolean Should the CSS be minified?
$addTimestamp boolean May we add a timestamp for caching purposes?

addJS() 공개 메소드

Add a javascript file into the array
public addJS ( string $file, boolean $minify = true, boolean $addTimestamp = null, integer $priorityGroup = self::PRIORITY_GROUP_DEFAULT )
$file string The path to the javascript-file that should be loaded.
$minify boolean Should the file be minified?
$addTimestamp boolean May we add a timestamp for caching purposes?
$priorityGroup integer

addJsData() 공개 메소드

Add data into the jsData
public addJsData ( string $module, string $key, mixed $value )
$module string The name of the module.
$key string The key whereunder the value will be stored.
$value mixed The value

addMetaData() 공개 메소드

Add meta data
public addMetaData ( array $attributes, boolean $overwrite = false, mixed $uniqueKeys = null, mixed $additionalKey = null )
$attributes array The attributes to parse.
$overwrite boolean Should we overwrite the current value?
$uniqueKeys mixed Which keys can we use to decide if an item is unique.
$additionalKey mixed This additional key helps you to create your own custom unique keys if required.

addMetaDescription() 공개 메소드

Add meta-description, somewhat a shortcut for the addMetaData-method
public addMetaDescription ( string $value, boolean $overwrite = false )
$value string The description.
$overwrite boolean Should we overwrite the previous value?

addMetaKeywords() 공개 메소드

Add meta-keywords, somewhat a shortcut for the addMetaData-method
public addMetaKeywords ( string $value, boolean $overwrite = false )
$value string The description.
$overwrite boolean Should we overwrite the previous value?

addOpenGraphData() 공개 메소드

Add Open Graph data
public addOpenGraphData ( string $key, string $value, boolean $overwrite = false )
$key string The key (without og:).
$value string The value.
$overwrite boolean Should we overwrite the previous value?

addOpenGraphImage() 공개 메소드

Add Open Graph image
public addOpenGraphImage ( string $image, boolean $overwrite = false, integer $width, integer $height )
$image string The path to the image.
$overwrite boolean Should we overwrite the previous value?
$width integer The width of the image.
$height integer The height of the image.

extractOpenGraphImages() 공개 메소드

Extract images from content that can be added add Open Graph image
public extractOpenGraphImages ( string $content )
$content string The content (where from to extract the images).

getCSSFiles() 공개 메소드

Get all added CSS files
public getCSSFiles ( ) : array
리턴 array

getJSFiles() 공개 메소드

get all added javascript files
public getJSFiles ( ) : array
리턴 array

getMeta() 공개 메소드

Get meta
public getMeta ( ) : array
리턴 array

getMetaCustom() 공개 메소드

Get the custom meta
public getMetaCustom ( ) : string
리턴 string

getMetaValue() 공개 메소드

Get all attributes for meta tag specified by the attribute and the value for that attribute.
public getMetaValue ( string $attribute, string $attributeValue ) : array
$attribute string The attribute to match on.
$attributeValue string The value for the unique attribute.
리턴 array

getPageTitle() 공개 메소드

Get the page title
public getPageTitle ( ) : string
리턴 string

parse() 공개 메소드

Parse the header into the template
public parse ( )

setCanonicalUrl() 공개 메소드

Set the canonical URL
public setCanonicalUrl ( string $url )
$url string The Canonical URL.

setMetaCustom() 공개 메소드

Set the custom meta
public setMetaCustom ( string $meta )
$meta string The meta data to set.

setPageTitle() 공개 메소드

Set the page title
public setPageTitle ( string $value, boolean $overwrite = false )
$value string The page title to be set or to be prepended.
$overwrite boolean Should the existing page title be overwritten?

setTwitterCard() 공개 메소드

Set Twitter Card
public setTwitterCard ( string $title, string $description, string $imageURL, string $cardType = 'summary', string $siteHandle = null, string $creatorHandle = null )
$title string The title (maximum 70 characters)
$description string A brief description of the card (maximum 200 characters)
$imageURL string The URL of the image (minimum 280x150 and <1MB)
$cardType string The cardtype, possible types: https://dev.twitter.com/cards/types
$siteHandle string (optional) Twitter handle of the site
$creatorHandle string (optional) Twitter handle of the author