mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 11:06:02 +02:00
27 lines
586 B
PHP
27 lines
586 B
PHP
<?php
|
|
|
|
namespace SilverStripe\FrameworkTest\Fields\NestedGridField;
|
|
|
|
use SilverStripe\FrameworkTest\Model\Company;
|
|
use SilverStripe\ORM\ArrayList;
|
|
use SilverStripe\ORM\DataObject;
|
|
|
|
class NonRelationalData extends DataObject
|
|
{
|
|
private static $table_name = 'NestedGridField_NonRelationalData';
|
|
|
|
private static $db = [
|
|
'Name' => 'Varchar(50)',
|
|
];
|
|
|
|
public function getList() {
|
|
$list = ArrayList::create();
|
|
$data = Company::get()->limit(5);
|
|
foreach ($data as $value) {
|
|
$list->push($value);
|
|
}
|
|
|
|
return $list;
|
|
}
|
|
}
|