1 | <?php |
||
15 | trait DoctrineBenchTrait |
||
16 | { |
||
17 | protected $objectManager; |
||
18 | |||
19 | public function getBenchContainer() |
||
20 | { |
||
21 | $container = $this->getContainer([ |
||
22 | 'mapping' => [ |
||
23 | Article::class => [ |
||
24 | 'properties' => [ |
||
25 | 'title' => [ |
||
26 | 'type' => 'text', |
||
27 | 'role' => 'title', |
||
28 | ], |
||
29 | 'image' => [ |
||
30 | 'type' => 'image', |
||
31 | 'role' => 'image', |
||
32 | ], |
||
33 | 'slideshow' => [ |
||
34 | 'type' => 'collection', |
||
35 | 'options' => [ |
||
36 | 'field_type' => 'image', |
||
37 | ], |
||
38 | ], |
||
39 | 'date' => [ |
||
40 | 'type' => 'datetime', |
||
41 | ], |
||
42 | 'referencedImage' => [ |
||
43 | 'type' => 'object_reference', |
||
44 | ], |
||
45 | 'paragraphs' => [ |
||
46 | 'type' => 'collection', |
||
47 | 'options' => [ |
||
48 | 'field_type' => 'text', |
||
49 | 'field_options' => [], |
||
50 | ], |
||
51 | ], |
||
52 | 'numbers' => [ |
||
53 | 'type' => 'collection', |
||
54 | 'options' => [ |
||
55 | 'field_type' => 'integer', |
||
56 | ], |
||
57 | ], |
||
58 | ], |
||
59 | ], |
||
60 | ], |
||
61 | ]); |
||
62 | |||
63 | return $container; |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * @Subject() |
||
68 | */ |
||
69 | public function image_phpcr_odm_only() |
||
80 | |||
81 | /** |
||
82 | * @Subject() |
||
83 | */ |
||
84 | public function ct_article() |
||
95 | |||
96 | /** |
||
97 | * @Subject() |
||
98 | */ |
||
99 | public function ct_article_with_image() |
||
114 | |||
115 | abstract protected function getContainer(array $config = []): Container; |
||
116 | } |
||
117 |