mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
0f386039df
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
33 lines
721 B
PHP
33 lines
721 B
PHP
<?php
|
|
|
|
namespace SilverStripe\View\Tests\SSTemplateEngineTest;
|
|
|
|
use SilverStripe\Dev\TestOnly;
|
|
use SilverStripe\Model\List\ArrayList;
|
|
use SilverStripe\Model\ArrayData;
|
|
use SilverStripe\Model\ModelData;
|
|
|
|
class CacheTestData extends ModelData implements TestOnly
|
|
{
|
|
|
|
public $testWithCalls = 0;
|
|
public $testLoopCalls = 0;
|
|
|
|
public function TestWithCall()
|
|
{
|
|
$this->testWithCalls++;
|
|
return ArrayData::create(['Message' => 'Hi']);
|
|
}
|
|
|
|
public function TestLoopCall()
|
|
{
|
|
$this->testLoopCalls++;
|
|
return ArrayList::create(
|
|
[
|
|
ArrayData::create(['Message' => 'One']),
|
|
ArrayData::create(['Message' => 'Two'])
|
|
]
|
|
);
|
|
}
|
|
}
|