ShortcutInterface.php 1.2 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
<?php

/**
 * @file
 * Contains \Drupal\shortcut\ShortcutInterface.
 */

namespace Drupal\shortcut;

use Drupal\Core\Entity\ContentEntityInterface;

/**
 * Provides an interface defining a shortcut entity.
 */
interface ShortcutInterface extends ContentEntityInterface {

  /**
   * Returns the title of this shortcut.
   *
   * @return string
   *   The title of this shortcut.
   */
  public function getTitle();

  /**
   * Sets the title of this shortcut.
   *
   * @param string $title
   *   The title of this shortcut.
   *
   * @return \Drupal\shortcut\ShortcutInterface
   *   The called shortcut entity.
   */
  public function setTitle($title);

  /**
   * Returns the weight among shortcuts with the same depth.
   *
   * @return int
   *   The shortcut weight.
   */
  public function getWeight();

  /**
   * Sets the weight among shortcuts with the same depth.
   *
47
   * @param int $weight
48 49 50 51 52 53 54
   *   The shortcut weight.
   *
   * @return \Drupal\shortcut\ShortcutInterface
   *   The called shortcut entity.
   */
  public function setWeight($weight);

55 56 57 58 59 60 61 62
  /**
   * Returns the URL object pointing to the configured route.
   *
   * @return \Drupal\Core\Url
   *   The URL object.
   */
  public function getUrl();

63
}