TestLocalTaskController.php

Same filename in other branches
  1. 8.9.x core/modules/content_moderation/tests/modules/content_moderation_test_local_task/src/Controller/TestLocalTaskController.php
  2. 10 core/modules/content_moderation/tests/modules/content_moderation_test_local_task/src/Controller/TestLocalTaskController.php
  3. 11.x core/modules/content_moderation/tests/modules/content_moderation_test_local_task/src/Controller/TestLocalTaskController.php

Namespace

Drupal\content_moderation_test_local_task\Controller

File

core/modules/content_moderation/tests/modules/content_moderation_test_local_task/src/Controller/TestLocalTaskController.php

View source
<?php

namespace Drupal\content_moderation_test_local_task\Controller;


/**
 * A test controller.
 */
class TestLocalTaskController {
    
    /**
     * A method which does not hint the node parameter to avoid upcasting.
     */
    public function methodWithoutUpcastNode($node) {
        return [
            '#markup' => 'It works!',
        ];
    }

}

Classes

Title Deprecated Summary
TestLocalTaskController A test controller.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.