Issue #3511357: Split by api.php
4 unresolved threads
4 unresolved threads
Closes #3511357
Merge request reports
Activity
added 302 commits
-
d11173ed...5f80b431 - 301 commits from branch
project:11.x
- 797f5d58 - Issue #3511357: Split by api.php
-
d11173ed...5f80b431 - 301 commits from branch
- core/modules/node/src/Hook/NodeNodeHooks.php 0 → 100644
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 { We intentionally chose to name them according to *.api.php files so that we could avoid bikeshedding over naming / grouping for this round. It's an easy defined way to be consistent and was discussed here: https://www.drupal.org/project/drupal/issues/3493453 if you have thoughts on that plan.
Edited by nicxvan
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 { 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