2024-05-21 05:50:01 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\FrameworkTest\Fields\NestedGridField;
|
|
|
|
|
|
|
|
use SilverStripe\FrameworkTest\Model\Company;
|
2024-09-23 04:34:06 +02:00
|
|
|
use SilverStripe\Model\List\ArrayList;
|
2024-05-21 05:50:01 +02:00
|
|
|
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();
|
2024-05-28 03:46:12 +02:00
|
|
|
$data = Company::get()->limit(5);
|
2024-05-21 05:50:01 +02:00
|
|
|
foreach ($data as $value) {
|
|
|
|
$list->push($value);
|
|
|
|
}
|
|
|
|
|
|
|
|
return $list;
|
|
|
|
}
|
|
|
|
}
|