You are here

interface SimpleMegaMenuHelperInterface in Simple Mega Menu 2.0.x

Same name and namespace in other branches
  1. 8 src/SimpleMegaMenuHelperInterface.php \Drupal\simple_megamenu\SimpleMegaMenuHelperInterface

Interface SimpleMegaMenuHelperInterface.

@package Drupal\simple_megamenu

Hierarchy

Expanded class hierarchy of SimpleMegaMenuHelperInterface

All classes that implement SimpleMegaMenuHelperInterface

File

src/SimpleMegaMenuHelperInterface.php, line 12

Namespace

Drupal\simple_megamenu
View source
interface SimpleMegaMenuHelperInterface {

  /**
   * Gets the menus targeted by a specific Simple mega menu type.
   *
   * @param \Drupal\simple_megamenu\Entity\SimpleMegaMenuTypeInterface $entity
   *   The Simple mega menu type entity.
   *
   * @return array
   *   The menus targeted by the config entity.
   */
  public function getTargetMenus(SimpleMegaMenuTypeInterface $entity);

  /**
   * Get SimpleMegaMenuType entities which target a menu.
   *
   * @param string $menu_name
   *   The menu name.
   *
   * @return array
   *   An array keyed by the SimpleMegaMenuType id and with the label as value.
   *   Otherwise, an empty array.
   */
  public function getMegaMenuTypeWhichTargetMenu($menu_name);

  /**
   * Is the menu is referenced by a SimpleMegaMenuType entity.
   *
   * @param string $menu_name
   *   The menu name.
   *
   * @return bool
   *   TRUE, if the menu is targeted by a SimpleMegaMenuType entity.
   *   Otherwise, FALSE.
   */
  public function menuIsTargetedByMegaMenuType($menu_name);

  /**
   * Get a SimpleMegaMenuType entity.
   *
   * @param string $id
   *   The SimpleMegaMenuType id.
   *
   * @return \Drupal\simple_megamenu\Entity\SimpleMegaMenuTypeInterface
   *   The SimpleMegaMenuTypeInterface entity.
   */
  public function getSimpleMegaMenuType($id);

  /**
   * Get a SimpleMegaMenu entity.
   *
   * @param string $id
   *   The SimpleMegaMenu id.
   *
   * @return \Drupal\simple_megamenu\Entity\SimpleMegaMenuInterface
   *   The SimpleMegaMenuInterface entity.
   */
  public function getSimpleMegaMenu($id);

}

Members

Namesort descending Modifiers Type Description Overrides
SimpleMegaMenuHelperInterface::getMegaMenuTypeWhichTargetMenu public function Get SimpleMegaMenuType entities which target a menu. 1
SimpleMegaMenuHelperInterface::getSimpleMegaMenu public function Get a SimpleMegaMenu entity. 1
SimpleMegaMenuHelperInterface::getSimpleMegaMenuType public function Get a SimpleMegaMenuType entity. 1
SimpleMegaMenuHelperInterface::getTargetMenus public function Gets the menus targeted by a specific Simple mega menu type. 1
SimpleMegaMenuHelperInterface::menuIsTargetedByMegaMenuType public function Is the menu is referenced by a SimpleMegaMenuType entity. 1