13
13
use AppBundle \Entity \Contact ;
14
14
use Sensio \Bundle \FrameworkExtraBundle \Configuration \Cache ;
15
15
use Symfony \Component \HttpFoundation \Response ;
16
- use Mni \FrontYAML \Parser ;
17
16
use AppBundle \Entity \Project ;
18
17
19
18
class DefaultController extends Controller
@@ -168,10 +167,8 @@ public function resourcesAction(Request $request)
168
167
{
169
168
$ file = $ this ->get ('kernel ' )->getRootDir ().'/../vendor/symfony-si/symfony-resources/README.md ' ;
170
169
$ content = (file_exists ($ file )) ? file_get_contents ($ file ) : '<h1>Symfony resources</h1> ' ;
171
- $ parser = new Parser ();
172
- $ document = $ parser ->parse ($ content );
173
170
174
- return $ this ->render ('default/resources.html.twig ' , ['html ' => $ document -> getContent () ]);
171
+ return $ this ->render ('default/resources.html.twig ' , ['html ' => $ content ]);
175
172
}
176
173
177
174
/**
@@ -182,10 +179,8 @@ public function cheatsheetAction()
182
179
{
183
180
$ file = $ this ->get ('kernel ' )->getRootDir ().'/../vendor/symfony-si/symfony-cheatsheet/README.md ' ;
184
181
$ content = (file_exists ($ file )) ? file_get_contents ($ file ) : '<h1>Symfony cheat sheet</h1> ' ;
185
- $ parser = new Parser ();
186
- $ document = $ parser ->parse ($ content );
187
182
188
- return $ this ->render ('default/cheatsheet.html.twig ' , ['html ' => $ document -> getContent () ]);
183
+ return $ this ->render ('default/cheatsheet.html.twig ' , ['html ' => $ content ]);
189
184
}
190
185
191
186
/**
@@ -315,9 +310,7 @@ public function conductAction()
315
310
{
316
311
$ file = $ this ->get ('kernel ' )->getRootDir ().'/../vendor/symfony-si/conduct/README.md ' ;
317
312
$ content = (file_exists ($ file )) ? file_get_contents ($ file ) : '<h1>Symfony.si Code of Conduct</h1> ' ;
318
- $ parser = new Parser ();
319
- $ document = $ parser ->parse ($ content );
320
313
321
- return $ this ->render ('default/conduct.html.twig ' , ['content ' => $ document -> getContent () ]);
314
+ return $ this ->render ('default/conduct.html.twig ' , ['content ' => $ content ]);
322
315
}
323
316
}
0 commit comments