Loading .gitlab-ci.yml +5 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,11 @@ variables: OPT_IN_TEST_NEXT_MINOR: 1 OPT_IN_TEST_NEXT_MAJOR: 1 OPT_IN_TEST_MAX_PHP: 1 # Speed up the execution of the Tests. _PHPUNIT_CONCURRENT: 1 # # Convenient for debugging: Enable in issue forks for testing. # _SHOW_ENVIRONMENT_VARIABLES: 1 # # PHPCS overrides and configuration. Loading admin_toolbar.module +4 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,10 @@ function toolbar_tools_menu_navigation_links(array $tree) { $link = $element->link; // Get the non-localized title to make the icon class. $definition = $link->getPluginDefinition(); // Prevent PHPSTAN error due to incorrect type hinting as an array of // strings (string[]) for property 'options' of class 'MenuLinkTreeElement' // in Core, preventing the assignment of an associative array of options. // @phpstan-ignore offsetAssign.dimType $element->options['attributes']['class'][] = 'toolbar-icon'; $string = strtolower(str_replace(['.', ' ', '_'], ['-', '-', '-'], $definition['id'])); $element->options['attributes']['class'][] = Html::cleanCssIdentifier('toolbar-icon-' . $string); Loading admin_toolbar_links_access_filter/admin_toolbar_links_access_filter.module +1 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ function admin_toolbar_links_access_filter_filter_non_accessible_links(array &$i elseif (!empty($item['url'])) { /** @var \Drupal\Core\Url $url */ $url = $item['url']; // @phpstan-ignore variable.undefined if ($url->isExternal() || !$original_link->getUrlObject()->isRouted()) { // Do not filter external URL at all. continue; Loading admin_toolbar_search/src/Controller/AdminToolbarSearchController.php +3 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,9 @@ class AdminToolbarSearchController extends ControllerBase { /** * Return additional search links. * * @return \Symfony\Component\HttpFoundation\JsonResponse * A JSON response with the search links. */ public function search() { return new JsonResponse($this->links->getLinks()); Loading admin_toolbar_search/src/Form/AdminToolbarSearchSettingsForm.php +19 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,9 @@ class AdminToolbarSearchSettingsForm extends ConfigFormBase { /** * {@inheritdoc} * * @return array<string> * An array of configuration names that this form is responsible for. */ protected function getEditableConfigNames() { return ['admin_toolbar_search.settings']; Loading @@ -26,6 +29,14 @@ class AdminToolbarSearchSettingsForm extends ConfigFormBase { /** * {@inheritdoc} * * @param array<string, mixed> $form * The form array. * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state. * * @return array<string, mixed> * The form array with the form elements. */ public function buildForm(array $form, FormStateInterface $form_state) { $form['display_menu_item'] = [ Loading @@ -39,6 +50,14 @@ class AdminToolbarSearchSettingsForm extends ConfigFormBase { /** * {@inheritdoc} * * @param array<mixed> $form * The form array. * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state. * * @return void * Nothing to return. */ public function submitForm(array &$form, FormStateInterface $form_state) { $this->config('admin_toolbar_search.settings') Loading Loading
.gitlab-ci.yml +5 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,11 @@ variables: OPT_IN_TEST_NEXT_MINOR: 1 OPT_IN_TEST_NEXT_MAJOR: 1 OPT_IN_TEST_MAX_PHP: 1 # Speed up the execution of the Tests. _PHPUNIT_CONCURRENT: 1 # # Convenient for debugging: Enable in issue forks for testing. # _SHOW_ENVIRONMENT_VARIABLES: 1 # # PHPCS overrides and configuration. Loading
admin_toolbar.module +4 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,10 @@ function toolbar_tools_menu_navigation_links(array $tree) { $link = $element->link; // Get the non-localized title to make the icon class. $definition = $link->getPluginDefinition(); // Prevent PHPSTAN error due to incorrect type hinting as an array of // strings (string[]) for property 'options' of class 'MenuLinkTreeElement' // in Core, preventing the assignment of an associative array of options. // @phpstan-ignore offsetAssign.dimType $element->options['attributes']['class'][] = 'toolbar-icon'; $string = strtolower(str_replace(['.', ' ', '_'], ['-', '-', '-'], $definition['id'])); $element->options['attributes']['class'][] = Html::cleanCssIdentifier('toolbar-icon-' . $string); Loading
admin_toolbar_links_access_filter/admin_toolbar_links_access_filter.module +1 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,7 @@ function admin_toolbar_links_access_filter_filter_non_accessible_links(array &$i elseif (!empty($item['url'])) { /** @var \Drupal\Core\Url $url */ $url = $item['url']; // @phpstan-ignore variable.undefined if ($url->isExternal() || !$original_link->getUrlObject()->isRouted()) { // Do not filter external URL at all. continue; Loading
admin_toolbar_search/src/Controller/AdminToolbarSearchController.php +3 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,9 @@ class AdminToolbarSearchController extends ControllerBase { /** * Return additional search links. * * @return \Symfony\Component\HttpFoundation\JsonResponse * A JSON response with the search links. */ public function search() { return new JsonResponse($this->links->getLinks()); Loading
admin_toolbar_search/src/Form/AdminToolbarSearchSettingsForm.php +19 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,9 @@ class AdminToolbarSearchSettingsForm extends ConfigFormBase { /** * {@inheritdoc} * * @return array<string> * An array of configuration names that this form is responsible for. */ protected function getEditableConfigNames() { return ['admin_toolbar_search.settings']; Loading @@ -26,6 +29,14 @@ class AdminToolbarSearchSettingsForm extends ConfigFormBase { /** * {@inheritdoc} * * @param array<string, mixed> $form * The form array. * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state. * * @return array<string, mixed> * The form array with the form elements. */ public function buildForm(array $form, FormStateInterface $form_state) { $form['display_menu_item'] = [ Loading @@ -39,6 +50,14 @@ class AdminToolbarSearchSettingsForm extends ConfigFormBase { /** * {@inheritdoc} * * @param array<mixed> $form * The form array. * @param \Drupal\Core\Form\FormStateInterface $form_state * The form state. * * @return void * Nothing to return. */ public function submitForm(array &$form, FormStateInterface $form_state) { $this->config('admin_toolbar_search.settings') Loading