File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 11Change Log: ` yii2-mpdf `
22=======================
33
4+ ## Version 1.0.5
5+
6+ ** Date:** 13-Oct-2018
7+
8+ - Correct ` methods ` parsing in output.
9+
410## Version 1.0.4
511
612** Date:** 09-Oct-2018
Original file line number Diff line number Diff line change 33/**
44 * @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2018
55 * @package yii2-mpdf
6- * @version 1.0.4
6+ * @version 1.0.5
77 */
88
99namespace kartik \mpdf ;
@@ -258,11 +258,6 @@ public function initTempPaths()
258258 */
259259 public function render ()
260260 {
261- if (!empty ($ this ->methods )) {
262- foreach ($ this ->methods as $ method => $ param ) {
263- $ this ->execute ($ method , $ param );
264- }
265- }
266261 return $ this ->output ($ this ->content , $ this ->filename , $ this ->destination );
267262 }
268263
@@ -371,12 +366,18 @@ public function execute($method, $params = [])
371366 * @param string $dest the output destination. Defaults to [[DEST_BROWSER]].
372367 *
373368 * @return mixed
369+ * @throws InvalidConfigException
374370 */
375371 public function output ($ content = '' , $ file = '' , $ dest = self ::DEST_BROWSER )
376372 {
377373 $ api = $ this ->getApi ();
378374 $ css = $ this ->getCss ();
379375 $ pdfAttachments = $ this ->getPdfAttachments ();
376+ if (!empty ($ this ->methods )) {
377+ foreach ($ this ->methods as $ method => $ param ) {
378+ $ this ->execute ($ method , $ param );
379+ }
380+ }
380381 if (!empty ($ css )) {
381382 $ api ->WriteHTML ($ css , 1 );
382383 $ api ->WriteHTML ($ content , 2 );
You can’t perform that action at this time.
0 commit comments