class BreadcrumbManagerTitleMetaTag in Breadcrumb Manager 7
Title meta tag controller.
This extends DrupalTitleMetaTag as we need to alter variables in template_preprocess_html() rather output a normal meta tag.
Hierarchy
- class \DrupalDefaultMetaTag implements DrupalMetaTagInterface
- class \DrupalTextMetaTag
- class \DrupalTitleMetaTag
- class \DrupalTextMetaTag
Expanded class hierarchy of BreadcrumbManagerTitleMetaTag
1 string reference to 'BreadcrumbManagerTitleMetaTag'
File
- includes/
breadcrumb_manager.metatag.inc, line 9
View source
class BreadcrumbManagerTitleMetaTag extends DrupalTitleMetaTag {
public function getElement(array $options = array()) {
$element = array();
$value = $this
->getValue($options);
if ($title = breadcrumb_manager_is_title_required()) {
list(, $site_name) = explode('|', $value);
$value = implode(' | ', array(
$title,
trim($site_name),
));
}
$element['#attached']['metatag_set_preprocess_variable'][] = array(
'html',
'head_title',
$value,
);
$element['#attached']['metatag_set_preprocess_variable'][] = array(
'html',
'head_array',
array(
'title' => $value,
),
);
return $element;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BreadcrumbManagerTitleMetaTag:: |
public | function |
Get the HTML tag for this meta tag. Overrides DrupalTitleMetaTag:: |
|
DrupalDefaultMetaTag:: |
protected | property | The values submitted for this tag. | |
DrupalDefaultMetaTag:: |
protected | property | All of the basic information about this tag. | |
DrupalDefaultMetaTag:: |
protected | property | This item's weight; used for sorting the output. | |
DrupalDefaultMetaTag:: |
protected | function | Make sure a given URL is absolute. | |
DrupalDefaultMetaTag:: |
public | function |
Calculate the weight of this meta tag. Overrides DrupalMetaTagInterface:: |
|
DrupalDefaultMetaTag:: |
protected | function | Identify the maximum length of which strings will be allowed. | |
DrupalDefaultMetaTag:: |
public static | function |
Copied from text.module with the following changes:. Overrides DrupalMetaTagInterface:: |
|
DrupalDefaultMetaTag:: |
protected | function | Remove unwanted formatting from a meta tag. | |
DrupalDefaultMetaTag:: |
protected | function | Shorten a string to a certain length using ::textSummary(). | |
DrupalDefaultMetaTag:: |
public | function |
Constructor. Overrides DrupalMetaTagInterface:: |
1 |
DrupalTextMetaTag:: |
public | function |
Build the form for this meta tag. Overrides DrupalDefaultMetaTag:: |
1 |
DrupalTextMetaTag:: |
public | function |
Get the string value of this meta tag. Overrides DrupalDefaultMetaTag:: |
1 |