silverstripe-framework/tests/php/View/SSTemplateEngineCacheBlockTest/VersionedModel.php
Guy Sartorelli cd8090d247
API Refactor template layer into its own module
Includes the following large-scale changes:
- Impoved barrier between model and view layers
- Improved casting of scalar to relevant DBField types
- Improved capabilities for rendering arbitrary data in templates
2024-10-14 14:52:36 +13:00

29 lines
629 B
PHP

<?php
namespace SilverStripe\View\Tests\SSTemplateEngineCacheBlockTest;
use SilverStripe\Dev\TestOnly;
use SilverStripe\ORM\DataObject;
use SilverStripe\Versioned\Versioned;
class VersionedModel extends DataObject implements TestOnly
{
private static $table_name = 'SSTemplateEngineCacheBlockTest_VersionedModel';
protected $entropy = 'default';
private static $extensions = [
Versioned::class
];
public function setEntropy($entropy)
{
$this->entropy = $entropy;
}
public function Inspect()
{
return $this->entropy . ' ' . Versioned::get_reading_mode();
}
}