Skip to content

Commit

Permalink
Add maker bundle information
Browse files Browse the repository at this point in the history
Add information on how to use the maker bundle to craete twig components, especially on how to create them in a subdirectory
  • Loading branch information
DennisdeBest authored Nov 16, 2024
1 parent 89c7fa9 commit a18ce4f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/TwigComponent/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,26 @@ and any other components by running:
Take a moment to fist pump - then come back!

You can also use the ``make`` commands to generate the component PHP and twig files :

.. code-block:: terminal
$ php bin/console make:twig-component Alert
If you want your component to reside in a sub directory like ``src/twig/Components/Alert/`` and make a specific component for a Danger alert you can run:

.. code-block:: terminal
$ php bin/console make:twig-component Alert\\Danger
Or:

.. code-block:: terminal
$ php bin/console make:twig-component 'Alert\Danger'
This wil render the php file at ``src\twig\Components\Alert\Danger.php`` and the twig file at ``templates\components\Alert\Danger.html.twig``

.. _naming:

Naming Your Component
Expand Down

0 comments on commit a18ce4f

Please sign in to comment.