File tree 2 files changed +13
-6
lines changed
2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 1
1
Change Log: ` yii2-mpdf `
2
2
=======================
3
3
4
+ ## Version 1.0.5
5
+
6
+ ** Date:** 13-Oct-2018
7
+
8
+ - Correct ` methods ` parsing in output.
9
+
4
10
## Version 1.0.4
5
11
6
12
** Date:** 09-Oct-2018
Original file line number Diff line number Diff line change 3
3
/**
4
4
* @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2018
5
5
* @package yii2-mpdf
6
- * @version 1.0.4
6
+ * @version 1.0.5
7
7
*/
8
8
9
9
namespace kartik \mpdf ;
@@ -258,11 +258,6 @@ public function initTempPaths()
258
258
*/
259
259
public function render ()
260
260
{
261
- if (!empty ($ this ->methods )) {
262
- foreach ($ this ->methods as $ method => $ param ) {
263
- $ this ->execute ($ method , $ param );
264
- }
265
- }
266
261
return $ this ->output ($ this ->content , $ this ->filename , $ this ->destination );
267
262
}
268
263
@@ -371,12 +366,18 @@ public function execute($method, $params = [])
371
366
* @param string $dest the output destination. Defaults to [[DEST_BROWSER]].
372
367
*
373
368
* @return mixed
369
+ * @throws InvalidConfigException
374
370
*/
375
371
public function output ($ content = '' , $ file = '' , $ dest = self ::DEST_BROWSER )
376
372
{
377
373
$ api = $ this ->getApi ();
378
374
$ css = $ this ->getCss ();
379
375
$ pdfAttachments = $ this ->getPdfAttachments ();
376
+ if (!empty ($ this ->methods )) {
377
+ foreach ($ this ->methods as $ method => $ param ) {
378
+ $ this ->execute ($ method , $ param );
379
+ }
380
+ }
380
381
if (!empty ($ css )) {
381
382
$ api ->WriteHTML ($ css , 1 );
382
383
$ api ->WriteHTML ($ content , 2 );
You can’t perform that action at this time.
0 commit comments