Source of file StaticPublisherTestPageController.php
Size: 0,601 Bytes - Last Modified: 2021-12-23T10:34:48+00:00
/var/www/docs.ssmods.com/process/src/tests/php/StaticPublisherTest/Controller/StaticPublisherTestPageController.php
123456789101112131415161718192021222324252627 | <?php namespace SilverStripe\StaticPublishQueue\Test\StaticPublisherTest\Controller; use PageController; use SilverStripe\Control\HTTPResponse; use SilverStripe\Dev\TestOnly; class StaticPublisherTestPageController extends PageController implements TestOnly { /** * @var array * @config */ private static $allowed_actions = ['json']; /** * @return HTTPResponse */ public function json() { $response = new HTTPResponse('{"firstName": "John"}'); $response->addHeader('Content-Type', 'application/json'); return $response; } } |