1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/*************************************************************** |
4
|
|
|
* Copyright notice |
5
|
|
|
* |
6
|
|
|
* (c) 2016 AOE GmbH <[email protected]> |
7
|
|
|
* |
8
|
|
|
* All rights reserved |
9
|
|
|
* |
10
|
|
|
* This script is part of the TYPO3 project. The TYPO3 project is |
11
|
|
|
* free software; you can redistribute it and/or modify |
12
|
|
|
* it under the terms of the GNU General Public License as published by |
13
|
|
|
* the Free Software Foundation; either version 3 of the License, or |
14
|
|
|
* (at your option) any later version. |
15
|
|
|
* |
16
|
|
|
* The GNU General Public License can be found at |
17
|
|
|
* http://www.gnu.org/copyleft/gpl.html. |
18
|
|
|
* |
19
|
|
|
* This script is distributed in the hope that it will be useful, |
20
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
21
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22
|
|
|
* GNU General Public License for more details. |
23
|
|
|
* |
24
|
|
|
* This copyright notice MUST APPEAR in all copies of the script! |
25
|
|
|
***************************************************************/ |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* @package FeatureFlag |
29
|
|
|
* @subpackage System_Typo3 |
30
|
|
|
*/ |
31
|
|
|
class Tx_FeatureFlag_System_Typo3_CacheManager |
32
|
|
|
{ |
33
|
|
|
/** |
34
|
|
|
* @var \TYPO3\CMS\Extbase\Object\ObjectManager |
35
|
|
|
*/ |
36
|
|
|
private $objectManager; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* Tx_FeatureFlag_System_Typo3_Cache constructor. |
40
|
|
|
* @param \TYPO3\CMS\Extbase\Object\ObjectManager $objectManager |
41
|
|
|
*/ |
42
|
|
|
public function __construct(\TYPO3\CMS\Extbase\Object\ObjectManager $objectManager) |
43
|
|
|
{ |
44
|
|
|
$this->objectManager = $objectManager; |
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* Clear all caches. Therefor it is necessary to login a BE_USER. You have to prevent |
49
|
|
|
* this function to run on live systems!!! |
50
|
|
|
*/ |
51
|
|
|
public function clearAllCaches() |
52
|
|
|
{ |
53
|
|
|
/** @var TYPO3\CMS\Core\DataHandling\DataHandler $tce */ |
54
|
|
|
$tce = $this->objectManager->get(TYPO3\CMS\Core\DataHandling\DataHandler::class); |
|
|
|
|
55
|
|
|
$tce->start(array(), array()); |
56
|
|
|
$tce->admin = 1; |
|
|
|
|
57
|
|
|
$tce->clear_cacheCmd('all'); |
58
|
|
|
} |
59
|
|
|
} |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.