1 | <?php |
||
15 | class FixBlogDuplicatesTask extends BuildTask |
||
16 | { |
||
17 | private static $segment = 'FixBlogDuplicatesTask'; |
||
|
|||
18 | |||
19 | protected $title = 'Fix blog duplicate categories / tags'; |
||
20 | |||
21 | protected $description = 'Merge categories and tags with the same title'; |
||
22 | |||
23 | public function run($request) |
||
28 | |||
29 | /** |
||
30 | * Log message to console / page |
||
31 | * |
||
32 | * @param string $message |
||
33 | */ |
||
34 | protected function message($message) |
||
42 | |||
43 | /** |
||
44 | * Progress used for CLI output |
||
45 | * |
||
46 | * @var int |
||
47 | */ |
||
48 | protected $printedDots = 0; |
||
49 | |||
50 | /** |
||
51 | * Render progress dots (20 dots per column) |
||
52 | * |
||
53 | * @param $current |
||
54 | * @param int $total |
||
55 | * @param string $character |
||
56 | */ |
||
57 | protected function progress($current, $total = 0, $character = '.') |
||
74 | |||
75 | /** |
||
76 | * Deduplicate the given class |
||
77 | * |
||
78 | * @param string $class Class name to dedupe |
||
79 | * @param string $mappingTable Table name mapping |
||
80 | * @param string $relationField Name of foreign key relation field on mapping table |
||
81 | */ |
||
82 | protected function dedupe($class, $mappingTable, $relationField) |
||
140 | } |
||
141 |