Skip to content
Snippets Groups Projects

Issue #3511357: Split by api.php

Open Adam Bramley requested to merge issue/drupal-3511357:3511357-split-by-api into 11.x
4 unresolved threads

Closes #3511357

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Drupal\node\Hook;
6
7 use Drupal\Core\StringTranslation\StringTranslationTrait;
8 use Drupal\Core\Hook\Attribute\Hook;
9
10 /**
11 * Node hook implementations for node.
12 */
13 class NodeNodeHooks {
  • Dave Long
  • 1 <?php
    2
    3 declare(strict_types=1);
    4
    5 namespace Drupal\node\Hook;
    6
    7 use Drupal\Core\Database\Query\SelectInterface;
    8 use Drupal\Core\Database\Query\AlterableInterface;
    9 use Drupal\Core\Hook\Attribute\Hook;
    10
    11 /**
    12 * Database hook implementations for node.
    13 */
    14 class NodeDatabaseHooks {
  • Dave Long
  • 1 <?php
    2
    3 declare(strict_types=1);
    4
    5 namespace Drupal\node\Hook;
    6
    7 use Drupal\Core\Extension\ModuleHandlerInterface;
    8 use Drupal\Core\Hook\Attribute\Hook;
    9
    10 /**
    11 * Hook implementations for node.
    12 */
    13 class NodeModuleHooks {
  • Dave Long
  • 101 *
    102 * @see node_form_system_themes_admin_form_submit()
    103 */
    104 #[Hook('form_system_themes_admin_form_alter')]
    105 public function formSystemThemesAdminFormAlter(&$form, FormStateInterface $form_state, $form_id) : void {
    106 $form['admin_theme']['use_admin_theme'] = [
    107 '#type' => 'checkbox',
    108 '#title' => $this->t('Use the administration theme when editing or creating content'),
    109 '#description' => $this->t('Control which roles can "View the administration theme" on the <a href=":permissions">Permissions page</a>.', [
    110 ':permissions' => Url::fromRoute('user.admin_permissions.module', [
    111 'modules' => 'system',
    112 ])->toString(),
    113 ]),
    114 '#default_value' => \Drupal::configFactory()->getEditable('node.settings')->get('use_admin_theme'),
    115 ];
    116 $form['#submit'][] = 'node_form_system_themes_admin_form_submit';
    Please register or sign in to reply
    Loading