Skip to content
Snippets Groups Projects
Commit ae12caf9 authored by catch's avatar catch
Browse files

Issue #2160599 by Wim Leers, vijaycs85: Remove drupal_add_js() from system module.

parent 8055460c
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -18,9 +18,13 @@ function test_page_test_menu() {
* @deprecated Use \Drupal\test_page_test\Controller\TestPageTestController::testPage()
*/
function test_page_test_page() {
drupal_add_js(array('test-setting' => 'azAZ09();.,\\\/-_{}'), array('type' => 'setting'));
$attached['js'][] = array(
'data' => array('test-setting' => 'azAZ09();.,\\\/-_{}'),
'type' => 'setting',
);
return array(
'#title' => t('Test page'),
'#markup' => t('Test page text.'),
'#attached' => $attached,
);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment