Skip to content
This repository has been archived by the owner on Aug 18, 2022. It is now read-only.

Commit

Permalink
markdown fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Guite committed Apr 6, 2020
1 parent ea99016 commit 72fba39
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Wizard
======
# Wizard

The Wizard Component is a management tool for multi-stage user interaction. It utilizes several Interfaces and the
Wizard class to create a workflow that is compatible with Symfony Forms and Twig templating. Relying on the concept of
Expand All @@ -12,20 +11,20 @@ for this purpose.
Create a concrete class that extends the `Zikula\Component\Wizard\AbstractStageContainer`. Use autowiring and autoconfiguration
to configure the class:

_instanceof: # only works for classes that are configured in this file
Zikula\Component\Wizard\StageInterface:
tags: ['my_special_tag']

# if this is the only instance of the interface you will use, you can use an alias
Zikula\Component\Wizard\StageContainerInterface: '@Acme\Bundle\MyCustomBundle\Container\FooStageContainer'
```yaml
_instanceof: # only works for classes that are configured in this file
Zikula\Component\Wizard\StageInterface:
tags: ['my_special_tag']

Acme\Bundle\MyCustomBundle\Container\FooStageContainer:
arguments:
$stages: !tagged_iterator my_special_tag
# if this is the only instance of the interface you will use, you can use an alias
Zikula\Component\Wizard\StageContainerInterface: '@Acme\Bundle\MyCustomBundle\Container\FooStageContainer'

Acme\Bundle\MyCustomBundle\Container\FooStageContainer:
arguments:
$stages: !tagged_iterator my_special_tag
```
Stage
-----
## Stage
A Stage is simply a class which implements the StageInterface. It defines a **name**, a **template name** and any
**template parameters** that stage will require. A stage must also define whether it is **necessary** by possibly
Expand All @@ -43,8 +42,7 @@ The Wizard can be halted in the `isNecessary()` method by throwing an `AbortStag
available for retrieval using `$wizard->getWarning()`.


Stage Definition File
---------------------
## Stage Definition File

The stage definition file is a simple yaml file. The first key `stages:` is required and then each stage should be
listed by `name` and each should have properties `class` and `order`. The `name` key must be the same as the name of the
Expand All @@ -54,7 +52,7 @@ identified with a `default` property which should be set to true. This stage wil
argument is provided.


###Sample stages.yml
### Sample stages.yml

```yaml
stages:
Expand All @@ -77,7 +75,7 @@ stages:
```


###Sample Controller
### Sample Controller

```php
use Symfony\Component\Form\FormFactoryInterface;
Expand Down

0 comments on commit 72fba39

Please sign in to comment.