silverstripe-framework/tests/php/View/ViewLayerDataTest/ExtensibleObjectExtension.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

25 lines
527 B
PHP

<?php
namespace SilverStripe\View\Tests\ViewLayerDataTest;
use SilverStripe\Core\Extension;
use SilverStripe\Dev\TestOnly;
class ExtensibleObjectExtension extends Extension implements TestOnly
{
public function getIterator(): iterable
{
return ['1','2','3','4','5','6','7','8','9','a','b','c','d','e'];
}
public function getAnything(): string
{
return 'something';
}
public function forTemplate(): string
{
return 'This text comes from the extension class';
}
}