2016-10-14 03:30:05 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\View\Tests\SSViewerTest;
|
|
|
|
|
|
|
|
use SilverStripe\Dev\TestOnly;
|
|
|
|
use SilverStripe\View\ViewableData;
|
|
|
|
|
2017-06-22 12:50:45 +02:00
|
|
|
/**
|
|
|
|
* @property string $TextValue
|
|
|
|
* @property string $HTMLValue
|
|
|
|
*/
|
2016-10-14 03:30:05 +02:00
|
|
|
class TestViewableData extends ViewableData implements TestOnly
|
|
|
|
{
|
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
private static $default_cast = 'Text';
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2020-04-20 19:58:09 +02:00
|
|
|
private static $casting = [
|
2016-12-16 05:34:21 +01:00
|
|
|
'TextValue' => 'Text',
|
|
|
|
'HTMLValue' => 'HTMLFragment'
|
2020-04-20 19:58:09 +02:00
|
|
|
];
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
public function methodWithOneArgument($arg1)
|
|
|
|
{
|
|
|
|
return "arg1:{$arg1}";
|
|
|
|
}
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
public function methodWithTwoArguments($arg1, $arg2)
|
|
|
|
{
|
|
|
|
return "arg1:{$arg1},arg2:{$arg2}";
|
|
|
|
}
|
2018-06-08 15:21:27 +02:00
|
|
|
|
|
|
|
public function Type($arg)
|
|
|
|
{
|
|
|
|
return gettype($arg) . ':' . $arg;
|
|
|
|
}
|
2016-10-14 03:30:05 +02:00
|
|
|
}
|