2016-10-14 03:30:05 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\Control\Tests\RequestHandlingTest;
|
|
|
|
|
|
|
|
use SilverStripe\Dev\TestOnly;
|
|
|
|
use SilverStripe\Forms\FormField;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Form field for the test
|
|
|
|
*/
|
|
|
|
class HandlingField extends FormField implements TestOnly
|
|
|
|
{
|
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
private static $allowed_actions = array(
|
|
|
|
'actionOnField'
|
|
|
|
);
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
public function actionOnField()
|
|
|
|
{
|
|
|
|
return "Test method on $this->name";
|
|
|
|
}
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
public function actionNotAllowedOnField()
|
|
|
|
{
|
|
|
|
return "actionNotAllowedOnField on $this->name";
|
|
|
|
}
|
2016-10-14 03:30:05 +02:00
|
|
|
}
|