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
46
46
47
47
Using the tree builder is a topic of itself. Refer to the according symfony documentation.
48
48
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
50
50
save it in the :php:class: `phpDocumentor\G uides\S ettings\P rojectSettings `. Examples of
51
51
settings options would be `logPath `, `showProgressBar ` or `theme `.
52
52
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:
21
21
:lineos:
22
22
23
23
The 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 `.
25
25
26
26
.. _extension_symfony :
27
27
28
28
Create an extension
29
29
===================
30
30
31
31
For 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:
36
36
37
37
.. literalinclude :: _YourExtension.php
38
38
:language: php
39
- :caption: your-extension/DependencyInjection/YourExtension.php
39
+ :caption: your-extension/src/ DependencyInjection/YourExtension.php
40
40
:lineos:
41
41
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.
44
44
Read chapter :ref: `extending_templates ` to learn more about this.
45
45
46
46
.. note ::
Original file line number Diff line number Diff line change @@ -11,15 +11,15 @@ Register the templates overrides in your extension's
11
11
12
12
.. literalinclude :: _YourExtension.php
13
13
:language: php
14
- :caption: your-extension/DependencyInjection/YourExtension.php
14
+ :caption: your-extension/src/ DependencyInjection/YourExtension.php
15
15
:lineos:
16
16
:emphasize-lines: 29-35
17
17
18
18
It is recommended to always extend an existing template so that the Twig files
19
19
of the base templates can be used as fallback for non-defined specific template
20
20
files.
21
21
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
23
23
extension in your extension's `composer.json `:
24
24
25
25
.. code-block :: json
@@ -35,12 +35,12 @@ extension in your extension's `composer.json`:
35
35
36
36
And then set `'extends' => 'bootstrap' ` (line 32 in the first code-snippet).
37
37
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
39
39
`composer.json `, and omit the key `extends `:
40
40
41
41
42
42
.. code-block :: php
43
- :caption: your-extension/DependencyInjection/YourExtension.php
43
+ :caption: your-extension/src/ DependencyInjection/YourExtension.php
44
44
45
45
$container->prependExtensionConfig('guides', [
46
46
'themes' => ['mytheme' => dirname(__DIR__, 3) . '/resources/template'],
You can’t perform that action at this time.
0 commit comments