Commit ae12caf9 authored by catch's avatar catch

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

parent 8055460c
......@@ -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,
);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment