Source of file TestController.php
Size: 1,060 Bytes - Last Modified: 2022-02-21T10:01:05+00:00
/var/www/docs.ssmods.com/process/src/tests/functional/TestController.php
12345678910111213141516171819202122232425262728293031323334353637383940 | <?php namespace Test\Functional; use AlexT\BTPayment\BraintreePageController; use SilverStripe\Control\Controller; use SilverStripe\Forms\FieldList; use SilverStripe\Forms\Form; use SilverStripe\Forms\FormAction; use SilverStripe\Forms\HiddenField; use SilverStripe\Forms\RequiredFields; use SilverStripe\Forms\TextField; class TestController extends BraintreePageController { public function __construct() { parent::__construct(); if (Controller::has_curr()) { $this->setRequest(Controller::curr()->getRequest()); } } private static $allowed_actions = array('Form'); private static $url_handlers = array( '$Action//$ID/$OtherID' => "handleAction", ); public function Link($action = null) { return Controller::join_links( 'FormTest_Controller', $this->getRequest()->latestParam('Action'), $this->getRequest()->latestParam('ID'), $action ); } public function Form() { return $this->BTPaymentForm(); } } |