File tree Expand file tree Collapse file tree 3 files changed +13
-13
lines changed
Expand file tree Collapse file tree 3 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ Register the new configuration option in the :php:`TreeBuilder` at
4646
4747Using the tree builder is a topic of itself. Refer to the according symfony documentation.
4848
49- If the configuration is a setting option to controll the applications workflow you can
49+ If the configuration is a setting option to control the applications workflow you can
5050save it in the :php:class: `phpDocumentor\G uides\S ettings\P rojectSettings `. Examples of
5151settings options would be `logPath `, `showProgressBar ` or `theme `.
5252
Original file line number Diff line number Diff line change @@ -21,26 +21,26 @@ Each Composer package must have a file `composer.json`. See an example here:
2121 :lineos:
2222
2323The PHP sources can be found in the directory `src ` then as is stated in line 8
24- in the `composer.json `.
24+ in the `composer.json `.
2525
2626.. _extension_symfony :
2727
2828Create an extension
2929===================
3030
3131For the PHP package to be an extension you need a class
32- extending `\Symfony\Component\DependencyInjection\Extension\Extension ` by
33- implementing the interface
34- `Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface ` we
35- can also add our own configurations to our extension:
32+ extending `\Symfony\Component\DependencyInjection\Extension\Extension `.
33+ By implementing the interface
34+ `Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface `
35+ you can also configure the guides extension from your extension:
3636
3737.. literalinclude :: _YourExtension.php
3838 :language: php
39- :caption: your-extension/DependencyInjection/YourExtension.php
39+ :caption: your-extension/src/ DependencyInjection/YourExtension.php
4040 :lineos:
4141
42- Lines 24 to 28 load a :ref: `Dependency Injection configuration <extension_di_configuration >`
43- file. Lines 29 to 36 configure the directory overriding the default templates.
42+ Lines 24 to 28 load a :ref: `Dependency Injection configuration <extension_di_configuration >`
43+ file. Lines 29 to 36 configure the directory overriding the default templates.
4444Read chapter :ref: `extending_templates ` to learn more about this.
4545
4646.. note ::
Original file line number Diff line number Diff line change @@ -11,15 +11,15 @@ Register the templates overrides in your extension's
1111
1212.. literalinclude :: _YourExtension.php
1313 :language: php
14- :caption: your-extension/DependencyInjection/YourExtension.php
14+ :caption: your-extension/src/ DependencyInjection/YourExtension.php
1515 :lineos:
1616 :emphasize-lines: 29-35
1717
1818It is recommended to always extend an existing template so that the Twig files
1919of the base templates can be used as fallback for non-defined specific template
2020files.
2121
22- In order to extend the default bootstrap theme, require the according base
22+ In order to extend the default bootstrap theme, require the according base
2323extension in your extension's `composer.json `:
2424
2525.. code-block :: json
@@ -35,12 +35,12 @@ extension in your extension's `composer.json`:
3535
3636 And then set `'extends' => 'bootstrap' ` (line 32 in the first code-snippet).
3737
38- To extend the base template (plain HTML) require `phpdocumentor/guides ` in your
38+ To extend the base template (plain HTML) require `phpdocumentor/guides ` in your
3939`composer.json `, and omit the key `extends `:
4040
4141
4242.. code-block :: php
43- :caption: your-extension/DependencyInjection/YourExtension.php
43+ :caption: your-extension/src/ DependencyInjection/YourExtension.php
4444
4545 $container->prependExtensionConfig('guides', [
4646 'themes' => ['mytheme' => dirname(__DIR__, 3) . '/resources/template'],
You can’t perform that action at this time.
0 commit comments