@@ -16,65 +16,77 @@ Installation
16
16
1. Install the FMElfinderBundle according to the `FMElfinderBundle documentation `_.
17
17
2. Configure the FMElfinderBundle to use the MediaBundle adapter:
18
18
19
- .. configuration-block ::
19
+ .. configuration-block ::
20
20
21
- .. code-block :: yaml
21
+ .. code-block :: yaml
22
22
23
- # app/config/config.yml
24
- fm_elfinder :
23
+ # app/config/config.yml
24
+ fm_elfinder :
25
25
instances :
26
26
default :
27
- locale : " %locale%"
28
- editor : ckeditor
29
- connector :
30
- roots :
31
- media :
32
- driver : cmf_media.adapter.elfinder.phpcr_driver
33
- path : " %cmf_media.persistence.phpcr.media_basepath%"
34
- upload_allow : ['all']
35
- upload_max_size : 2M
36
-
37
- .. code-block :: xml
38
-
39
- <!-- app/config/config.xml -->
40
- <?xml version =" 1.0" charset =" UTF-8" ?>
41
- <container xmlns =" http://symfony.com/schema/dic/services" >
42
-
43
- <config xmlns =" http://example.org/dic/schema/fm_elfinder"
44
- locale =" %locale%"
45
- editor =" ckeditor"
46
- >
47
- <connector >
48
- <root
49
- name =" media"
50
- driver =" cmf_media.adapter.elfinder.phpcr_driver"
51
- path =" %cmf_media.persistence.phpcr.media_basepath%"
52
- upload-max-size =" 2M"
53
- upload-allow =" all"
54
- />
55
- </connector >
27
+ locale : " %locale%"
28
+ editor : ckeditor
29
+ connector :
30
+ roots :
31
+ media :
32
+ driver : cmf_media.adapter.elfinder.phpcr_driver
33
+ path : " %cmf_media.persistence.phpcr.media_basepath%"
34
+ upload_allow : ['all']
35
+ upload_max_size : 2M
36
+
37
+ .. code-block :: xml
38
+
39
+ <!-- app/config/config.xml -->
40
+ <?xml version =" 1.0" charset =" UTF-8" ?>
41
+ <container xmlns =" http://symfony.com/schema/dic/services" >
42
+
43
+ <config xmlns =" http://example.org/dic/schema/fm_elfinder" >
44
+ <instances
45
+ locale =" %locale%"
46
+ editor =" ckeditor"
47
+ >
48
+ <default >
49
+ <connector >
50
+ <root
51
+ name =" media"
52
+ driver =" cmf_media.adapter.elfinder.phpcr_driver"
53
+ path =" %cmf_media.persistence.phpcr.media_basepath%"
54
+ upload-max-size =" 2M"
55
+ upload-allow =" all"
56
+ />
57
+ </connector >
58
+ </default >
59
+ </instances >
56
60
</config >
57
-
58
- </container >
59
-
60
- .. code-block :: php
61
-
62
- // app/config/config.php
63
- $container->loadFromExtension('fm_elfinder', array(
64
- 'locale' => '%locale%',
65
- 'editor' => 'ckeditor',
66
- 'connector' => array(
67
- 'roots' => array(
68
- 'media' => array(
69
- 'driver' => 'cmf_media.adapter.elfinder.phpcr_driver',
70
- 'path' => '%cmf_media.persistence.phpcr.media_basepath%',
71
- 'upload_allow': array('all'),
72
- 'upload_max_size' => '2M',
73
- ),
74
- ),
75
- ),
61
+ </container >
62
+
63
+ .. code-block :: php
64
+
65
+ // app/config/config.php
66
+ $container->loadFromExtension('fm_elfinder', array(
67
+ 'instances' => array(
68
+ 'default' => array(
69
+ 'locale' => '%locale%',
70
+ 'editor' => 'ckeditor',
71
+ 'connector' => array(
72
+ 'roots' => array(
73
+ 'media' => array(
74
+ 'driver' => 'cmf_media.adapter.elfinder.phpcr_driver',
75
+ 'path' => '%cmf_media.persistence.phpcr.media_basepath%',
76
+ 'upload_allow': array('all'),
77
+ 'upload_max_size' => '2M',
78
+ ),
79
+ ),
80
+ ),
81
+ ),
82
+ ),
76
83
));
77
84
85
+ .. versionadded :: 2.0
86
+ The above configuration is intended for the FMElfinderBundle version 2.0
87
+ and above. Version 1 used a different format without the possibility to
88
+ configure more than one editor.
89
+
78
90
.. note ::
79
91
80
92
The driver service depends on your storage layer. For now, the MediaBundle
@@ -85,27 +97,27 @@ Installation
85
97
86
98
3. When using the LiipImagineBundle, add an imagine filter for the thumbnails:
87
99
88
- .. configuration-block ::
100
+ .. configuration-block ::
89
101
90
- .. code-block :: yaml
102
+ .. code-block :: yaml
91
103
92
- # app/config/config.yml
93
- liip_imagine :
94
- # ...
95
- filter_sets :
96
- # default filter to be used for elfinder thumbnails
97
- elfinder_thumbnail :
98
- data_loader : cmf_media_doctrine_phpcr
99
- quality : 85
100
- filters :
101
- thumbnail : { size: [48, 48], mode: inset }
102
- # ...
104
+ # app/config/config.yml
105
+ liip_imagine :
106
+ # ...
107
+ filter_sets :
108
+ # default filter to be used for elfinder thumbnails
109
+ elfinder_thumbnail :
110
+ data_loader : cmf_media_doctrine_phpcr
111
+ quality : 85
112
+ filters :
113
+ thumbnail : { size: [48, 48], mode: inset }
114
+ # ...
103
115
104
- .. code-block :: xml
116
+ .. code-block :: xml
105
117
106
- <!-- app/config/config.xml -->
107
- <?xml version =" 1.0" charset =" UTF-8" ?>
108
- <container xmlns =" http://symfony.com/schema/dic/services" >
118
+ <!-- app/config/config.xml -->
119
+ <?xml version =" 1.0" charset =" UTF-8" ?>
120
+ <container xmlns =" http://symfony.com/schema/dic/services" >
109
121
110
122
<config xmlns =" http://example.org/dic/schema/liip_imagine" >
111
123
<!-- ... -->
@@ -116,28 +128,28 @@ Installation
116
128
<!-- ... -->
117
129
</config >
118
130
119
- </container >
120
-
121
- .. code-block :: php
122
-
123
- // app/config/config.php
124
- $container->loadFromExtension('liip_imagine', array(
125
- // ...
126
- 'filter_sets' => array(
127
- // default filter to be used for elfinder thumbnails
128
- 'elfinder_thumbnail' => array(
129
- 'data_loader' => 'cmf_media_doctrine_phpcr',
130
- 'quality' => 85,
131
- 'filters' => array(
132
- 'thumbnail' => array(
133
- 'size' => array(48, 48),
134
- 'mode' => 'inset',
135
- ),
136
- ),
137
- ),
138
- // ...
139
- ),
140
- ));
131
+ </container >
132
+
133
+ .. code-block :: php
134
+
135
+ // app/config/config.php
136
+ $container->loadFromExtension('liip_imagine', array(
137
+ // ...
138
+ 'filter_sets' => array(
139
+ // default filter to be used for elfinder thumbnails
140
+ 'elfinder_thumbnail' => array(
141
+ 'data_loader' => 'cmf_media_doctrine_phpcr',
142
+ 'quality' => 85,
143
+ 'filters' => array(
144
+ 'thumbnail' => array(
145
+ 'size' => array(48, 48),
146
+ 'mode' => 'inset',
147
+ ),
148
+ ),
149
+ ),
150
+ // ...
151
+ ),
152
+ ));
141
153
142
154
4. Test the elFinder browser by navigating to: ``http://<yoursite>/app_dev.php/elfinder ``
143
155
0 commit comments