public function FeatureListMenuLink::access in Configuration selector 8.2
Same name and namespace in other branches
- 8 src/Plugin/Derivative/FeatureListMenuLink.php \Drupal\config_selector\Plugin\Derivative\FeatureListMenuLink::access()
Allows access to Config Selector UI if there are entities.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
1 string reference to 'FeatureListMenuLink::access'
File
- src/
Plugin/ Derivative/ FeatureListMenuLink.php, line 59
Class
- FeatureListMenuLink
- Test derivative with an unsafe string.
Namespace
Drupal\config_selector\Plugin\DerivativeCode
public function access() {
$entity_type = $this->entityTypeManager
->getDefinition('config_selector_feature');
return AccessResult::allowedIf($this
->count() > 0)
->addCacheTags($entity_type
->getListCacheTags())
->addCacheContexts($entity_type
->getListCacheContexts());
}