public function MenuLinkContentVisibilityChecker::isVisible in Custom Menu Links Visibility 8
File
- src/
MenuLinkContentVisibilityChecker.php, line 48
Class
Namespace
Drupal\menu_link_content_visibilityCode
public function isVisible() {
if ($visibility = unserialize($this->menu_link_content
->get('visibility')->value)) {
foreach ($visibility as $condition_id => $condition_configuration) {
if (!$this
->evaluateCondition($condition_id, $condition_configuration)) {
return FALSE;
}
}
}
return TRUE;
}