You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* This class uses the DescriptionTemplateTrait to display text we put in the
11
+
* templates/description.html.twig file.
11
12
*/
12
-
class JsExampleController extends ControllerBase {
13
+
class JsExampleController {
14
+
use DescriptionTemplateTrait;
13
15
14
16
/**
15
-
* Example info page.
16
-
*
17
-
* @return array
18
-
* A renderable array.
17
+
* {@inheritdoc}
19
18
*/
20
-
publicfunctioninfo() {
21
-
$build['content'] = [
22
-
'first_line' => [
23
-
'#prefix' => '<p>',
24
-
'#markup' => 'Drupal includes jQuery and jQuery UI.',
25
-
'#suffix' => '</p>',
26
-
],
27
-
'second_line' => [
28
-
'#prefix' => '<p>',
29
-
'#markup' => 'We have two examples of using these:',
30
-
'#suffix' => '</p>',
31
-
],
32
-
'examples_list' => [
33
-
'#theme' => 'item_list',
34
-
'#items' => [
35
-
'An accordion-style section reveal effect. This demonstrates calling a jQuery UI function using Drupal's rendering system.',
36
-
'Sorting according to numeric 'weight.' This demonstrates attaching your own JavaScript code to individual page elements using Drupal's rendering system.',
0 commit comments