return ProductStreamDefinition::
class;
} public function generate(int
$numberOfItems, DemodataContext
$context, array
$options =
[]): void
{ $context->
getConsole()->
progressStart($numberOfItems);
$faker =
$context->
getFaker();
$pool =
[ ['field' => 'height', 'type' => 'range', 'parameters' =>
[RangeFilter::GTE =>
$faker->
numberBetween(1, 1000
)]],
['field' => 'width', 'type' => 'range', 'parameters' =>
[RangeFilter::GTE =>
$faker->
numberBetween(1, 1000
)]],
['field' => 'weight', 'type' => 'range', 'parameters' =>
[RangeFilter::GTE =>
$faker->
numberBetween(1, 1000
)]],
['field' => 'height', 'type' => 'range', 'parameters' =>
[RangeFilter::LTE =>
$faker->
numberBetween(1, 1000
)]],
['field' => 'width', 'type' => 'range', 'parameters' =>
[RangeFilter::LTE =>
$faker->
numberBetween(1, 1000
)]],
['field' => 'weight', 'type' => 'range', 'parameters' =>
[RangeFilter::LTE =>
$faker->
numberBetween(1, 1000
)]],
['field' => 'height', 'type' => 'range', 'parameters' =>
[RangeFilter::GT =>
$faker->
numberBetween(1, 500
), RangeFilter::LT =>
$faker->
numberBetween(500, 1000
)]],
['field' => 'width', 'type' => 'range', 'parameters' =>
[RangeFilter::GT =>
$faker->
numberBetween(1, 500
), RangeFilter::LT =>
$faker->
numberBetween(500, 1000
)]],
['field' => 'weight', 'type' => 'range', 'parameters' =>
[RangeFilter::GT =>
$faker->
numberBetween(1, 500
), RangeFilter::LT =>
$faker->
numberBetween(500, 1000
)]],
['field' => 'stock', 'type' => 'equals', 'value' => '1000'
],
['field' => 'name', 'type' => 'contains', 'value' => 'Awesome'
],
['field' => 'categoriesRo.id', 'type' => 'equalsAny', 'value' =>
implode('|',
[$context->
getRandomId('category'
),
$context->
getRandomId('category'
)])],
[