mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
28 lines
474 B
PHP
28 lines
474 B
PHP
|
<?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
|
||
|
{
|
||
|
|
||
|
private static $allowed_actions = array(
|
||
|
'actionOnField'
|
||
|
);
|
||
|
|
||
|
public function actionOnField()
|
||
|
{
|
||
|
return "Test method on $this->name";
|
||
|
}
|
||
|
|
||
|
public function actionNotAllowedOnField()
|
||
|
{
|
||
|
return "actionNotAllowedOnField on $this->name";
|
||
|
}
|
||
|
}
|