Метод | Описание | |
---|---|---|
__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 |
public __construct ( Symfony\Component\HttpKernel\KernelInterface $kernel ) | ||
$kernel | Symfony\Component\HttpKernel\KernelInterface |
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 |
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. |
public addMetaDescription ( string $value, boolean $overwrite = false ) | ||
$value | string | The description. |
$overwrite | boolean | Should we overwrite the previous value? |
public addMetaKeywords ( string $value, boolean $overwrite = false ) | ||
$value | string | The description. |
$overwrite | boolean | Should we overwrite the previous value? |
public addRssLink ( string $title, string $link ) | ||
$title | string | |
$link | string |
public extractOpenGraphImages ( string $content ) | ||
$content | string | The content (where from to extract the images). |
public getCSSFiles ( ) : array | ||
Результат | array |
public getJSFiles ( ) : array | ||
Результат | array |
public getMetaCustom ( ) : string | ||
Результат | string |
public setCanonicalUrl ( string $url ) | ||
$url | string | The Canonical URL. |
public setMetaCustom ( string $meta ) | ||
$meta | string | The meta data to set. |
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? |
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 |