You are here

public function MenuTreeStorage::menuNameInUse in Colossal Menu 8

Same name and namespace in other branches
  1. 2.x src/Menu/MenuTreeStorage.php \Drupal\colossal_menu\Menu\MenuTreeStorage::menuNameInUse()

Determines whether a specific menu name is used in the tree.

Parameters

string $menu_name: The menu name.

Return value

bool Returns TRUE if the given menu name is used, otherwise FALSE.

Overrides MenuTreeStorageInterface::menuNameInUse

File

src/Menu/MenuTreeStorage.php, line 351

Class

MenuTreeStorage
Provides a menu tree storage using the database.

Namespace

Drupal\colossal_menu\Menu

Code

public function menuNameInUse($menu_name) {
  $links = $this->storage
    ->loadByProperties([
    'menu' => $menu_name,
  ]);
  return empty($links);
}