Source of file SubsiteXHRController.php
Size: 0,734 Bytes - Last Modified: 2021-12-23T10:04:53+00:00
/var/www/docs.ssmods.com/process/src/tests/code/SubsiteXHRController.php
12345678910111213141516171819202122232425262728293031323334 | <?php use SilverStripe\Admin\LeftAndMain; /** * Section-agnostic PJAX controller. */ class SubsiteXHRController extends LeftAndMain { private static $url_segment = 'SubsiteXHRController'; public function getResponseNegotiator() { $negotiator = parent::getResponseNegotiator(); $self = $this; // Register a new callback $negotiator->setCallback('SubsiteList', function () use (&$self) { return $self->SubsiteList(); }); return $negotiator; } /** * Provide the list of available subsites as a cms-section-agnostic PJAX handler. */ public function SubsiteList() { return $this->renderWith('Includes/SubsiteList'); } } |