| @@ 36-38 (lines=3) @@ | ||
| 33 | parent::configure($data, $template); |
|
| 34 | ||
| 35 | // filename |
|
| 36 | if (! isset($data['file']) || ! is_string($data['file'])) { |
|
| 37 | $data['file'] = ''; |
|
| 38 | } |
|
| 39 | $this->filename = $template->getPathResolver()->obtainPath($data['file']); |
|
| 40 | // background (remember that background is optional) |
|
| 41 | if (isset($data['background'])) { |
|
| @@ 81-83 (lines=3) @@ | ||
| 78 | parent::configure($data, $template); |
|
| 79 | ||
| 80 | // content |
|
| 81 | if (! isset($data['content']) || ! is_string($data['content'])) { |
|
| 82 | $data['content'] = ''; |
|
| 83 | } |
|
| 84 | $this->content = $data['content']; |
|
| 85 | ||
| 86 | // color |
|
| @@ 94-96 (lines=3) @@ | ||
| 91 | } |
|
| 92 | ||
| 93 | // font |
|
| 94 | if (! isset($data['font']) || ! is_string($data['font'])) { |
|
| 95 | $data['font'] = ''; |
|
| 96 | } |
|
| 97 | $this->font = $template->getFont($data['font']); |
|
| 98 | ||
| 99 | // fontSize |
|
| @@ 105-107 (lines=3) @@ | ||
| 102 | } |
|
| 103 | ||
| 104 | // align |
|
| 105 | if (! isset($data['align']) || ! is_string($data['align'])) { |
|
| 106 | $data['align'] = ''; |
|
| 107 | } |
|
| 108 | $this->align = Align::newFromString($data['align']); |
|
| 109 | ||
| 110 | ||
| @@ 118-120 (lines=3) @@ | ||
| 115 | $background = $template->getBackground(); |
|
| 116 | } |
|
| 117 | // textbackground: backgroundtype |
|
| 118 | if (! isset($data['backgroundtype']) || ! is_string($data['backgroundtype'])) { |
|
| 119 | $data['backgroundtype'] = ''; |
|
| 120 | } |
|
| 121 | $this->textBackground = TextBackground::newFromString($data['backgroundtype'], $background); |
|
| 122 | } |
|
| 123 | ||