Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
33 | public function getTemplate() |
||
34 | { |
||
35 | $actions = []; |
||
36 | |||
37 | foreach ($this->actions as $action) { |
||
38 | switch (strtolower($action->type)) { |
||
39 | case Action::TYPE_POSTBACK: |
||
40 | $actions[] = new PostbackTemplateActionBuilder($action->label, $action->value); |
||
41 | break; |
||
42 | case Action::TYPE_URI: |
||
43 | $actions[] = new UriTemplateActionBuilder($action->label, $action->value); |
||
44 | break; |
||
45 | default: |
||
46 | $actions[] = new MessageTemplateActionBuilder($action->label, $action->value);; |
||
47 | } |
||
48 | } |
||
49 | |||
50 | return new TemplateMessageBuilder($this->altText, new ConfirmTemplateBuilder($this->title, $actions)); |
||
51 | } |
||
53 |