You are here

interface LocalActionInterface in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Menu/LocalActionInterface.php \Drupal\Core\Menu\LocalActionInterface

Defines an interface for menu local actions.

Hierarchy

Expanded class hierarchy of LocalActionInterface

All classes that implement LocalActionInterface

File

core/lib/Drupal/Core/Menu/LocalActionInterface.php, line 15
Contains \Drupal\Core\Menu\LocalActionInterface.

Namespace

Drupal\Core\Menu
View source
interface LocalActionInterface {

  /**
   * Get the route name from the settings.
   *
   * @return string
   *   The name of the route this action links to.
   */
  public function getRouteName();

  /**
   * Returns the route parameters needed to render a link for the local action.
   *
   * @param \Drupal\Core\Routing\RouteMatchInterface $route_match
   *   The current route match.
   *
   * @return array
   *   An array of parameter names and values.
   */
  public function getRouteParameters(RouteMatchInterface $route_match);

  /**
   * Returns the weight for the local action.
   *
   * @return int
   */
  public function getWeight();

  /**
   * Returns options for rendering a link for the local action.
   *
   * @param \Drupal\Core\Routing\RouteMatchInterface $route_match
   *   The current route match.
   *
   * @return array
   *   An associative array of options.
   */
  public function getOptions(RouteMatchInterface $route_match);

  /**
   * Returns the localized title to be shown for this action.
   *
   * Subclasses may add optional arguments like NodeInterface $node = NULL that
   * will be supplied by the ControllerResolver.
   *
   * @return string
   *   The title to be shown for this action.
   *
   * @see \Drupal\Core\Menu\LocalActionManager::getTitle()
   */
  public function getTitle();

}

Members

Namesort descending Modifiers Type Description Overrides
LocalActionInterface::getOptions public function Returns options for rendering a link for the local action. 1
LocalActionInterface::getRouteName public function Get the route name from the settings. 1
LocalActionInterface::getRouteParameters public function Returns the route parameters needed to render a link for the local action. 1
LocalActionInterface::getTitle public function Returns the localized title to be shown for this action. 1
LocalActionInterface::getWeight public function Returns the weight for the local action. 1