1 | <?php |
||
22 | class wizard |
||
23 | { |
||
24 | /** @var string The default BBvideo site */ |
||
25 | const BBVIDEO_DEFAULT = 'youtube'; |
||
26 | |||
27 | /** @var cache_driver */ |
||
28 | protected $cache; |
||
29 | |||
30 | /** @var helper */ |
||
31 | protected $helper; |
||
32 | |||
33 | /** @var request */ |
||
34 | protected $request; |
||
35 | |||
36 | /** @var template */ |
||
37 | protected $template; |
||
38 | |||
39 | /** @var textformatter */ |
||
40 | protected $textformatter; |
||
41 | |||
42 | /** @var string */ |
||
43 | protected $ext_root_path; |
||
44 | |||
45 | /** |
||
46 | * Constructor |
||
47 | * |
||
48 | * @param cache_driver $cache Cache driver |
||
49 | * @param helper $helper Controller helper object |
||
50 | * @param request $request Request object |
||
51 | * @param template $template Template object |
||
52 | * @param textformatter $textformatter TextFormatter Factory |
||
53 | * @param string $ext_root_path Path to abbc3 extension root |
||
54 | * @access public |
||
55 | */ |
||
56 | 11 | public function __construct(cache_driver $cache, helper $helper, request $request, template $template, textformatter $textformatter, $ext_root_path) |
|
65 | |||
66 | /** |
||
67 | * BBCode wizard controller accessed with the URL /wizard/bbcode/{mode} |
||
68 | * (where {mode} is a placeholder for a string of the bbcode tag name) |
||
69 | * intended to be accessed via AJAX only |
||
70 | * |
||
71 | * @param string $mode Mode taken from the URL |
||
72 | * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
||
73 | * @throws \phpbb\exception\http_exception An http exception |
||
74 | * @throws \phpbb\exception\runtime_exception Runtime exception if JSON fails |
||
75 | * @access public |
||
76 | */ |
||
77 | 10 | public function bbcode_wizard($mode) |
|
92 | |||
93 | /** |
||
94 | * Set template variables for the BBvideo wizard |
||
95 | * |
||
96 | * @access protected |
||
97 | */ |
||
98 | 2 | protected function generate_bbvideo_wizard() |
|
121 | } |
||
122 |