1 | <?php |
||
18 | class Extract extends BackendController |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * Extractor's model instance |
||
23 | * @var \gplcart\modules\extractor\models\Extract $extract |
||
24 | */ |
||
25 | protected $extract; |
||
26 | |||
27 | /** |
||
28 | * @param ExtractorExtractModel $extract |
||
29 | */ |
||
30 | public function __construct(ExtractorExtractModel $extract) |
||
36 | |||
37 | /** |
||
38 | * Displays the extractor page |
||
39 | */ |
||
40 | public function editExtract() |
||
53 | |||
54 | /** |
||
55 | * Returns an array of scopes to extract from |
||
56 | * @return array |
||
57 | */ |
||
58 | protected function getScopesExtract() |
||
76 | |||
77 | /** |
||
78 | * Downloads a file with extracted strings |
||
79 | */ |
||
80 | protected function downloadExtract() |
||
88 | |||
89 | /** |
||
90 | * Sets title on the extractor page |
||
91 | */ |
||
92 | protected function setTitleEditExtract() |
||
96 | |||
97 | /** |
||
98 | * Sets breadcrumbs on the extractor page |
||
99 | */ |
||
100 | protected function setBreadcrumbEditExtract() |
||
104 | |||
105 | /** |
||
106 | * Handles submitted actions related to string extraction |
||
107 | */ |
||
108 | protected function submitExtract() |
||
114 | |||
115 | /** |
||
116 | * Validates submitted data |
||
117 | */ |
||
118 | protected function validateExtract() |
||
133 | |||
134 | /** |
||
135 | * Creates a CSV file to write extracted string to and returns its path |
||
136 | * @return string |
||
137 | */ |
||
138 | protected function getFileExtract() |
||
144 | |||
145 | /** |
||
146 | * Renders and outputs the extractor page |
||
147 | */ |
||
148 | protected function outputEditExtract() |
||
152 | |||
153 | /** |
||
154 | * Returns a total number of files to scan |
||
155 | * @param array $directories |
||
156 | * @return integer |
||
157 | */ |
||
158 | protected function getTotalExtract(array $directories) |
||
167 | |||
168 | /** |
||
169 | * Sets and performs string extraction job |
||
170 | */ |
||
171 | protected function setJobExtract() |
||
194 | |||
195 | } |
||
196 |