public function ConfigPagesType::getContextLinks in Config Pages 8.2
Same name and namespace in other branches
- 8.3 src/Entity/ConfigPagesType.php \Drupal\config_pages\Entity\ConfigPagesType::getContextLinks()
Provides the context links.
Return value
array Get context links.
Throws
\Drupal\Component\Plugin\Exception\PluginException
File
- src/
Entity/ ConfigPagesType.php, line 166
Class
- ConfigPagesType
- Defines the config page type entity.
Namespace
Drupal\config_pages\EntityCode
public function getContextLinks() {
$contextLinks = [];
if (!empty($this->context['group'])) {
foreach ($this->context['group'] as $context_id => $context_enabled) {
if ($context_enabled) {
$context = $this->config_pages_context
->createInstance($context_id);
$contextLinks[$context_id] = $context
->getLinks();
}
}
}
return $contextLinks;
}