|
2 | 2 |
|
3 | 3 | > Collections can be created only in APIs. |
4 | 4 |
|
5 | | -To create a collection, use either of the following commands: |
| 5 | +To create a Collection, use either of the following commands: |
6 | 6 |
|
7 | 7 | ```shell |
8 | 8 | composer make collection |
|
14 | 14 | ./vendor/bin/dot-maker collection |
15 | 15 | ``` |
16 | 16 |
|
17 | | -The command must identify in which module you want to create the new collection. |
| 17 | +`dot-maker` needs to determine in which module you want to create the new Collection. |
18 | 18 | To determine this, it will prompt you to enter the name of an existing module: |
19 | 19 |
|
20 | 20 | > Existing module name: |
21 | 21 |
|
22 | | -If you input a module name which does not exist (like, "NonExistentModule"), the command throws an error: |
| 22 | +If you input a module name which does not exist (like, "NonExistentModule"), an error will be thrown: |
23 | 23 |
|
24 | 24 | > Module "NonExistentModule" not found |
25 | 25 |
|
26 | 26 | and will keep prompting for a valid module name until you provide one. |
27 | 27 |
|
28 | 28 | --- |
29 | 29 |
|
30 | | -Once the target module has been identified, the command will prompt you to input a name for the collection: |
| 30 | +Once the target module has been identified, you will be prompted to input a name for the Collection: |
31 | 31 |
|
32 | 32 | > Collection name: |
33 | 33 |
|
34 | 34 | **The name must contain only letters and numbers.** |
35 | 35 |
|
36 | | -If you leave the name blank, the command will exit. |
| 36 | +If you leave the name blank, the process will exit. |
37 | 37 |
|
38 | | -If you input an invalid name (like, "."), the command throws an error: |
| 38 | +If you input an invalid name (like, "."), an error will be thrown: |
39 | 39 |
|
40 | 40 | > Invalid Collection name: "." |
41 | 41 |
|
42 | | -If you input the name of an existing collection (like, "ExistingCollection"), the command throws an error: |
| 42 | +If you input the name of an existing Collection (like, "ExistingCollection"), an error will be thrown: |
43 | 43 |
|
44 | 44 | > Class "ExistingCollection" already exists at /path/to/project/src/ExistingModule/src/Collection/ExistingCollection.php |
45 | 45 |
|
46 | | -If you input a valid name, the command will create the collection and output a success message: |
| 46 | +If you input a valid name, `dot-maker` will create the Collection and output a success message: |
47 | 47 |
|
48 | 48 | > Created Collection: /path/to/project/src/ExistingModule/src/Collection/NewCollection.php |
49 | 49 |
|
50 | | -To allow the creation of multiple collections, the command will loop until you leave the name blank. |
| 50 | +To allow the creation of multiple Collections, the process will loop until you leave the name blank. |
0 commit comments