<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
camspiers / silverstripe-fixturegenerator example snippets
use Camspiers\SilverStripe\FixtureGenerator;
$records = //some DataObjectSet
(new FixtureGenerator\Generator(
new FixtureGenerator\Dumpers\Yaml(
__DIR__ . '/tests/MyFixture.yml'
)
))->process($records);
use Camspiers\SilverStripe\FixtureGenerator;
$records = //some DataObjectSet
(new FixtureGenerator\Generator(
new FixtureGenerator\Dumpers\Yaml(
__DIR__ . '/tests/MyFixture.yml'
),
array(
'MyDataObject.SomeHasOneRelation',
'MyDataObject.SomeHasManyRelation'
)
))->process($records);
use Camspiers\SilverStripe\FixtureGenerator;
$records = //some DataObjectSet
(new FixtureGenerator\Generator(
new FixtureGenerator\Dumpers\Yaml(
__DIR__ . '/tests/MyFixture.yml'
),
array(
'MyDataObject.SomeHasOneRelation',
'MyDataObject.SomeHasManyRelation'
),
FixtureGenerator\Generator::RELATION_MODE_EXCLUDE
))->process($records);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.