Skip to content

Commit c20ad37

Browse files
author
Mario Blazek
committed
Documentation update
1 parent 0957d56 commit c20ad37

File tree

6 files changed

+71
-26
lines changed

6 files changed

+71
-26
lines changed

doc/ACTIONS.md

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Actions
1+
Actions
2+
=======
23

34
### Available actions
45

@@ -8,23 +9,14 @@ This bundle has some already developed actions:
89

910
Database action stores form data to database, to be specific, to `ezinfocollection` and `ezinfocollection_attribute` tables.
1011

12+
For advanced configuration please refer to [configuration](CONFIGURATION.md) part.
13+
1114
#### Email
1215

1316
Email action sends email with form data to configured email address, that may be set in content type or configuration.
1417
For every content type different Twig template can be applied. Default template for emails must be specified.
1518

16-
Per content type email template configuration example:
17-
18-
```yaml
19-
netgen.default.information_collection.email.ng_feedback_form: 'AcmeBundle:email:ng_feedback_form.html.twig'
20-
netgen.default.information_collection.email.some_other_form: 'AcmeBundle:email:some_other_form.html.twig'
21-
```
22-
23-
Default email template configuration example:
24-
25-
```yaml
26-
netgen.default.information_collection.email.default: 'AcmeBundle:email:default.html.twig'
27-
```
19+
For advanced configuration please refer to [configuration](CONFIGURATION.md) part.
2820

2921
### Creating custom actions
3022

@@ -74,9 +66,8 @@ netgen_information_collection:
7466
default:
7567
- email
7668
- database
77-
content_type:
78-
my_content_type:
79-
- email
80-
- database
81-
- custom_action
69+
my_content_type:
70+
- email
71+
- database
72+
- custom_action
8273
```

doc/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Change Log
1+
Changelog
2+
=========
3+
24
All notable changes to this project will be documented in this file.
35

46
The format is based on [Keep a Changelog](http://keepachangelog.com/)

doc/CONFIGURATION.md

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,52 @@
1-
# Configuration
1+
Configuration
2+
=============
3+
4+
Some advanced use cases.
5+
6+
## Specifiying which action to run per content type
7+
8+
By default all actions set by *default* under *actions* tree will be executed for all content types.
9+
10+
```yaml
11+
actions:
12+
default:
13+
- email
14+
- database
15+
```
16+
17+
To run only specific action for given content type, for example *my_content_type* and *email* add this to configuration:
18+
19+
```yaml
20+
actions:
21+
default:
22+
- email
23+
- database
24+
my_content_type:
25+
- email
26+
```
27+
28+
Or to execute only *database* action for *my_content_type_2*:
29+
30+
```yaml
31+
actions:
32+
default:
33+
- email
34+
- database
35+
my_content_type:
36+
- email
37+
my_content_type_2:
38+
- database
39+
```
40+
41+
## Specifiying which email templates to use per content type
42+
43+
In case when want to split email templates per content type, rather than using default one all, add this to configuration:
44+
45+
```yaml
46+
action_config:
47+
email:
48+
templates:
49+
default: 'AcmeBundle:email:default.html.twig'
50+
my_content_type: 'AcmeBundle:email:my_content_type.html.twig'
51+
my_content_type2: 'AcmeBundle:email:my_content_type2.html.twig'
52+
```

doc/DOC.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
NetgenInformationCollectionBundle
2-
=================================
1+
Documentation
2+
=============
33

44
## How it works
55

doc/FIELD_HANDLERS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Field handlers
1+
Field handlers
2+
==============
23

34
### Creating custom field handlers
45

doc/INSTALL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
NetgenInformationCollectionBundle installation instructions
2-
===========================================================
1+
Installation instructions
2+
=========================
33

44
Requirements
55
------------
@@ -12,7 +12,7 @@ Installation steps
1212

1313
### Use Composer
1414

15-
Run the following from your website root folder to install Netgen InformationCollection Bundle:
15+
Run the following from your website root folder to install NetgenInformationCollectionBundle:
1616

1717
```bash
1818
$ composer require netgen/information-collection-bundle

0 commit comments

Comments
 (0)