Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Drupal\authorization\Plugin; |
| 6 | |
| 7 | use Drupal\Component\Plugin\ConfigurableInterface; |
| 8 | use Drupal\Component\Plugin\DependentPluginInterface; |
| 9 | use Drupal\Component\Plugin\DerivativeInspectionInterface; |
| 10 | use Drupal\Component\Plugin\PluginInspectionInterface; |
| 11 | use Drupal\Core\Form\FormStateInterface; |
| 12 | use Drupal\Core\Plugin\ContainerFactoryPluginInterface; |
| 13 | use Drupal\Core\Plugin\PluginFormInterface; |
| 14 | use Drupal\Core\StringTranslation\TranslatableMarkup; |
| 15 | |
| 16 | /** |
| 17 | * Describes a configurable Authorization plugin. |
| 18 | */ |
| 19 | interface ConfigurableAuthorizationPluginInterface extends PluginInspectionInterface, DerivativeInspectionInterface, ConfigurableInterface, DependentPluginInterface, PluginFormInterface, ContainerFactoryPluginInterface { |
| 20 | |
| 21 | /** |
| 22 | * Returns the label for use on the administration pages. |
| 23 | * |
| 24 | * @return \Drupal\Core\StringTranslation\TranslatableMarkup |
| 25 | * The administration label. |
| 26 | */ |
| 27 | public function label(): TranslatableMarkup; |
| 28 | |
| 29 | /** |
| 30 | * Returns the plugin's description. |
| 31 | * |
| 32 | * @return \Drupal\Core\StringTranslation\TranslatableMarkup|string |
| 33 | * A string describing the plugin. Might contain HTML and should be already |
| 34 | * sanitized for output. |
| 35 | */ |
| 36 | public function getDescription(); |
| 37 | |
| 38 | /** |
| 39 | * Builds the authorization form row. |
| 40 | * |
| 41 | * Return array. |
| 42 | * |
| 43 | * @param array $form |
| 44 | * An associative array containing the structure of the form. |
| 45 | * @param \Drupal\Core\Form\FormStateInterface $form_state |
| 46 | * The current state of the form. |
| 47 | * @param int $index |
| 48 | * The row number of the mapping. |
| 49 | */ |
| 50 | public function buildRowForm(array $form, FormStateInterface $form_state, $index); |
| 51 | |
| 52 | /** |
| 53 | * Builds the authorization row description. |
| 54 | * |
| 55 | * Return string. |
| 56 | * |
| 57 | * @param array $form |
| 58 | * An associative array containing the structure of the form. |
| 59 | * @param \Drupal\Core\Form\FormStateInterface $form_state |
| 60 | * The current state of the form. |
| 61 | */ |
| 62 | public function buildRowDescription(array $form, FormStateInterface $form_state); |
| 63 | |
| 64 | /** |
| 65 | * Validates the authorization form row. |
| 66 | * |
| 67 | * @param array $form |
| 68 | * An associative array containing the structure of the form. |
| 69 | * @param \Drupal\Core\Form\FormStateInterface $form_state |
| 70 | * The current state of the form. |
| 71 | */ |
| 72 | public function validateRowForm(array &$form, FormStateInterface $form_state): void; |
| 73 | |
| 74 | /** |
| 75 | * Submits the authorization form row. |
| 76 | * |
| 77 | * @param array $form |
| 78 | * An associative array containing the structure of the form. |
| 79 | * @param \Drupal\Core\Form\FormStateInterface $form_state |
| 80 | * The current state of the form. |
| 81 | */ |
| 82 | public function submitRowForm(array &$form, FormStateInterface $form_state): void; |
| 83 | |
| 84 | /** |
| 85 | * Tokens for the relevant plugin. |
| 86 | * |
| 87 | * @return array |
| 88 | * Placeholders for string replacement. |
| 89 | */ |
| 90 | public function getTokens(): array; |
| 91 | |
| 92 | } |