Skip to content

Commit b32857f

Browse files
authored
Add config example with PHP 8 attributes to input types docs (#455)
1 parent 8dea1e4 commit b32857f

File tree

5 files changed

+90
-0
lines changed

5 files changed

+90
-0
lines changed

website/docs/input-types.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,12 +412,30 @@ public function createLocation(float $latitude, float $longitude): Location
412412

413413
In case you want to override the input type name, you can use the "name" attribute of the @Factory annotation:
414414

415+
<Tabs
416+
defaultValue="php8"
417+
values={[
418+
{label: 'PHP 8', value: 'php8'},
419+
{label: 'PHP 7', value: 'php7'},
420+
]}>
421+
<TabItem value="php8">
422+
423+
```php
424+
#[Factory(name: 'MyNewInputName', default: true)]
425+
```
426+
427+
</TabItem>
428+
<TabItem value="php7">
429+
415430
```php
416431
/**
417432
* @Factory(name="MyNewInputName", default=true)
418433
*/
419434
```
420435

436+
</TabItem>
437+
</Tabs>
438+
421439
Note that you need to add the "default" attribute is you want your factory to be used by default (more on this in
422440
the next chapter).
423441

website/versioned_docs/version-4.1/input-types.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,30 @@ public function createLocation(float $latitude, float $longitude): Location
224224

225225
In case you want to override the input type name, you can use the "name" attribute of the @Factory annotation:
226226

227+
<Tabs
228+
defaultValue="php8"
229+
values={[
230+
{label: 'PHP 8', value: 'php8'},
231+
{label: 'PHP 7', value: 'php7'},
232+
]}>
233+
<TabItem value="php8">
234+
235+
```php
236+
#[Factory(name: 'MyNewInputName', default: true)]
227237
```
238+
239+
</TabItem>
240+
<TabItem value="php7">
241+
242+
```php
228243
/**
229244
* @Factory(name="MyNewInputName", default=true)
230245
*/
231246
```
232247

248+
</TabItem>
249+
</Tabs>
250+
233251
Note that you need to add the "default" attribute is you want your factory to be used by default (more on this in
234252
the next chapter).
235253

website/versioned_docs/version-4.2/input-types.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,30 @@ public function createLocation(float $latitude, float $longitude): Location
225225

226226
In case you want to override the input type name, you can use the "name" attribute of the @Factory annotation:
227227

228+
<Tabs
229+
defaultValue="php8"
230+
values={[
231+
{label: 'PHP 8', value: 'php8'},
232+
{label: 'PHP 7', value: 'php7'},
233+
]}>
234+
<TabItem value="php8">
235+
236+
```php
237+
#[Factory(name: 'MyNewInputName', default: true)]
238+
```
239+
240+
</TabItem>
241+
<TabItem value="php7">
242+
228243
```php
229244
/**
230245
* @Factory(name="MyNewInputName", default=true)
231246
*/
232247
```
233248

249+
</TabItem>
250+
</Tabs>
251+
234252
Note that you need to add the "default" attribute is you want your factory to be used by default (more on this in
235253
the next chapter).
236254

website/versioned_docs/version-4.3/input-types.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,30 @@ public function createLocation(float $latitude, float $longitude): Location
225225

226226
In case you want to override the input type name, you can use the "name" attribute of the @Factory annotation:
227227

228+
<Tabs
229+
defaultValue="php8"
230+
values={[
231+
{label: 'PHP 8', value: 'php8'},
232+
{label: 'PHP 7', value: 'php7'},
233+
]}>
234+
<TabItem value="php8">
235+
236+
```php
237+
#[Factory(name: 'MyNewInputName', default: true)]
238+
```
239+
240+
</TabItem>
241+
<TabItem value="php7">
242+
228243
```php
229244
/**
230245
* @Factory(name="MyNewInputName", default=true)
231246
*/
232247
```
233248

249+
</TabItem>
250+
</Tabs>
251+
234252
Note that you need to add the "default" attribute is you want your factory to be used by default (more on this in
235253
the next chapter).
236254

website/versioned_docs/version-5.0/input-types.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,30 @@ public function createLocation(float $latitude, float $longitude): Location
225225

226226
In case you want to override the input type name, you can use the "name" attribute of the @Factory annotation:
227227

228+
<Tabs
229+
defaultValue="php8"
230+
values={[
231+
{label: 'PHP 8', value: 'php8'},
232+
{label: 'PHP 7', value: 'php7'},
233+
]}>
234+
<TabItem value="php8">
235+
236+
```php
237+
#[Factory(name: 'MyNewInputName', default: true)]
238+
```
239+
240+
</TabItem>
241+
<TabItem value="php7">
242+
228243
```php
229244
/**
230245
* @Factory(name="MyNewInputName", default=true)
231246
*/
232247
```
233248

249+
</TabItem>
250+
</Tabs>
251+
234252
Note that you need to add the "default" attribute is you want your factory to be used by default (more on this in
235253
the next chapter).
236254

0 commit comments

Comments
 (0)