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 relative directories to scan |
||
56 | * @return array |
||
57 | */ |
||
58 | protected function getRelativeDirectories() |
||
67 | |||
68 | /** |
||
69 | * Downloads a file with extracted strings |
||
70 | */ |
||
71 | protected function downloadExtract() |
||
79 | |||
80 | /** |
||
81 | * Sets title on the extractor page |
||
82 | */ |
||
83 | protected function setTitleEditExtract() |
||
87 | |||
88 | /** |
||
89 | * Sets breadcrumbs on the extractor page |
||
90 | */ |
||
91 | protected function setBreadcrumbEditExtract() |
||
95 | |||
96 | /** |
||
97 | * Handles submitted actions related to string extraction |
||
98 | */ |
||
99 | protected function submitExtract() |
||
111 | |||
112 | /** |
||
113 | * Creates a CSV file to write extracted string to and returns its path |
||
114 | * @return string |
||
115 | */ |
||
116 | protected function getFileExtract() |
||
121 | |||
122 | /** |
||
123 | * Renders and outputs the extractor page |
||
124 | */ |
||
125 | protected function outputEditExtract() |
||
129 | |||
130 | /** |
||
131 | * Returns a total number of files to scan |
||
132 | * @return integer |
||
133 | */ |
||
134 | protected function getTotalExtract() |
||
143 | |||
144 | /** |
||
145 | * Sets and performs string extraction job |
||
146 | * @param string $file |
||
147 | */ |
||
148 | protected function setJobExtract($file) |
||
168 | |||
169 | } |
||
170 |