mirror of
https://github.com/silverstripe/silverstripe-frameworktest
synced 2024-10-22 09:06:02 +00:00
27 lines
596 B
PHP
27 lines
596 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()->byIDs([1,2,3,4,5]);
|
||
|
foreach ($data as $value) {
|
||
|
$list->push($value);
|
||
|
}
|
||
|
|
||
|
return $list;
|
||
|
}
|
||
|
}
|