2016-10-14 03:30:05 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\View\Tests\ViewableDataTest;
|
|
|
|
|
|
|
|
use SilverStripe\Core\Convert;
|
|
|
|
use SilverStripe\Dev\TestOnly;
|
|
|
|
use SilverStripe\View\ViewableData;
|
|
|
|
|
|
|
|
class UnescapedCaster extends ViewableData implements TestOnly
|
|
|
|
{
|
2016-12-16 05:34:21 +01:00
|
|
|
protected $value;
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2016-12-16 05:34:21 +01:00
|
|
|
public function setValue($value)
|
|
|
|
{
|
|
|
|
$this->value = $value;
|
|
|
|
}
|
2016-10-14 03:30:05 +02:00
|
|
|
|
2024-08-28 00:54:31 +02:00
|
|
|
public function forTemplate(): string
|
2016-12-16 05:34:21 +01:00
|
|
|
{
|
|
|
|
return Convert::raw2xml($this->value);
|
|
|
|
}
|
2016-10-14 03:30:05 +02:00
|
|
|
}
|