trait PageBreadcrumbsFormTrait in Panels Breadcrumbs 8
Trait PageBreadcrumbsFormTrait.
@package Drupal\panels_breadcrumbs\Form
Hierarchy
- trait \Drupal\panels_breadcrumbs\Form\PageBreadcrumbsFormTrait
File
- src/
Form/ PageBreadcrumbsFormTrait.php, line 12
Namespace
Drupal\panels_breadcrumbs\FormView source
trait PageBreadcrumbsFormTrait {
/**
* Get panels breadcrumbs settings keys.
*/
public static function getSettingsKeys() {
return [
'state',
'titles',
'paths',
'home',
'home_text',
];
}
/**
* Get types of tokens based on contexts.
*/
public static function getTypesOfTokens(PageVariantInterface $page_variant) {
$types = [];
foreach ($page_variant
->getContexts() as $id => $context) {
if ($type = \Drupal::service('token.entity_mapper')
->getTokenTypeForEntityType($id)) {
$types[] = $type;
}
}
return $types;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PageBreadcrumbsFormTrait:: |
public static | function | Get panels breadcrumbs settings keys. | |
PageBreadcrumbsFormTrait:: |
public static | function | Get types of tokens based on contexts. |