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
<?php
/**
* @file
* Contains \Drupal\Core\Menu\Form\MenuLinkFormInterface.
*/
namespace Drupal\Core\Menu\Form;
use Drupal\Core\Menu\MenuLinkInterface;
use Drupal\Core\Plugin\PluginFormInterface;
/**
* Defines an interface for edit forms of menu links.
*
* All menu link plugins use the same interface for their configuration or
* editing form, but the implementations may differ.
*
* @see \Drupal\Core\Menu\MenuLinkInterface::getFormClass()
*/
interface MenuLinkFormInterface extends PluginFormInterface {
/**
* Injects the menu link plugin instance.
*
* @param \Drupal\Core\Menu\MenuLinkInterface $menu_link
* A menu link plugin instance.
*/
public function setMenuLinkInstance(MenuLinkInterface $menu_link);
/**
* Extracts a plugin definition from form values.
*
* @param array $form
* An associative array containing the structure of the form.
* @param array $form_state
* An associative array containing the current state of the form.
*
* @return array
* The new plugin definition values taken from the form values.
*/
public function extractFormValues(array &$form, array &$form_state);
}