Loading entity_confirmation.module +20 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,8 @@ use Drupal\Core\Entity\Display\EntityFormDisplayInterface; use Drupal\Core\Entity\EntityFormInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\Markup; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Url; /** * Implements hook_form_alter(). Loading Loading @@ -193,3 +195,21 @@ function entity_confirmation_form_op_submit(array &$form, FormStateInterface $fo } } } /** * Implements hook_help(). */ function entity_confirmation_help($route_name, RouteMatchInterface $route_match): string { $build = []; if ($route_name === 'help.page.entity_confirmation') { $build[] = [ '#markup' => '<h2>' . t('Documentation') . '</h2>', ]; $build[] = [ '#type' => 'link', '#title' => 'https://git.drupalcode.org/project/entity_confirmation/-/blob/1.x/README.md', '#url' => Url::fromUri('https://git.drupalcode.org/project/entity_confirmation/-/blob/1.x/README.md'), ]; } return \Drupal::service('renderer')->render($build); } Loading
entity_confirmation.module +20 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,8 @@ use Drupal\Core\Entity\Display\EntityFormDisplayInterface; use Drupal\Core\Entity\EntityFormInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Render\Markup; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Url; /** * Implements hook_form_alter(). Loading Loading @@ -193,3 +195,21 @@ function entity_confirmation_form_op_submit(array &$form, FormStateInterface $fo } } } /** * Implements hook_help(). */ function entity_confirmation_help($route_name, RouteMatchInterface $route_match): string { $build = []; if ($route_name === 'help.page.entity_confirmation') { $build[] = [ '#markup' => '<h2>' . t('Documentation') . '</h2>', ]; $build[] = [ '#type' => 'link', '#title' => 'https://git.drupalcode.org/project/entity_confirmation/-/blob/1.x/README.md', '#url' => Url::fromUri('https://git.drupalcode.org/project/entity_confirmation/-/blob/1.x/README.md'), ]; } return \Drupal::service('renderer')->render($build); }