You are here

public function SignupMenuLink::isEnabled in Open Social 8.2

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_user/src/Plugin/Menu/SignupMenuLink.php \Drupal\social_user\Plugin\Menu\SignupMenuLink::isEnabled()
  2. 8 modules/social_features/social_user/src/Plugin/Menu/SignupMenuLink.php \Drupal\social_user\Plugin\Menu\SignupMenuLink::isEnabled()
  3. 8.3 modules/social_features/social_user/src/Plugin/Menu/SignupMenuLink.php \Drupal\social_user\Plugin\Menu\SignupMenuLink::isEnabled()
  4. 8.4 modules/social_features/social_user/src/Plugin/Menu/SignupMenuLink.php \Drupal\social_user\Plugin\Menu\SignupMenuLink::isEnabled()
  5. 8.5 modules/social_features/social_user/src/Plugin/Menu/SignupMenuLink.php \Drupal\social_user\Plugin\Menu\SignupMenuLink::isEnabled()
  6. 8.6 modules/social_features/social_user/src/Plugin/Menu/SignupMenuLink.php \Drupal\social_user\Plugin\Menu\SignupMenuLink::isEnabled()
  7. 8.7 modules/social_features/social_user/src/Plugin/Menu/SignupMenuLink.php \Drupal\social_user\Plugin\Menu\SignupMenuLink::isEnabled()
  8. 8.8 modules/social_features/social_user/src/Plugin/Menu/SignupMenuLink.php \Drupal\social_user\Plugin\Menu\SignupMenuLink::isEnabled()
  9. 10.3.x modules/social_features/social_user/src/Plugin/Menu/SignupMenuLink.php \Drupal\social_user\Plugin\Menu\SignupMenuLink::isEnabled()
  10. 10.0.x modules/social_features/social_user/src/Plugin/Menu/SignupMenuLink.php \Drupal\social_user\Plugin\Menu\SignupMenuLink::isEnabled()
  11. 10.1.x modules/social_features/social_user/src/Plugin/Menu/SignupMenuLink.php \Drupal\social_user\Plugin\Menu\SignupMenuLink::isEnabled()
  12. 10.2.x modules/social_features/social_user/src/Plugin/Menu/SignupMenuLink.php \Drupal\social_user\Plugin\Menu\SignupMenuLink::isEnabled()

Returns whether the menu link is enabled (not hidden).

Return value

bool TRUE for enabled, FALSE otherwise.

Overrides MenuLinkBase::isEnabled

File

modules/social_features/social_user/src/Plugin/Menu/SignupMenuLink.php, line 58

Class

SignupMenuLink
A menu link that shows "Sign up" in the user account menu.

Namespace

Drupal\social_user\Plugin\Menu

Code

public function isEnabled() {
  if ($this->currentUser
    ->isAuthenticated()) {
    return FALSE;
  }
  else {
    return parent::isEnabled();
  }
}