This repository was archived by the owner on Aug 15, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +141
-0
lines changed
Expand file tree Collapse file tree 7 files changed +141
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ class Tx_Coreapi_Controller_ApiCommandController extends Tx_Extbase_MVC_Controller_CommandController {
4+
5+ /**
6+ * Clear all caches
7+ *
8+ * @return string
9+ */
10+ public function clearAllCacheCommand () {
11+ $ this ->objectManager ->get ('Tx_Coreapi_Service_CacheApiService ' )->clearAllCaches ();
12+ return 'OK ' ;
13+ }
14+
15+ /**
16+ * Clear configuration cache (temp_CACHED_..)
17+ *
18+ * @return string
19+ */
20+ public function clearConfigurationCacheCommand () {
21+ $ this ->objectManager ->get ('Tx_Coreapi_Service_CacheApiService ' )->clearConfigurationCache ();
22+ return 'OK ' ;
23+ }
24+ }
25+
26+ ?>
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ class Tx_Coreapi_Service_CacheApiService {
4+
5+ /**
6+ * @var t3lib_TCEmain
7+ */
8+ protected $ tce ;
9+
10+ /**
11+ *
12+ */
13+ public function initializeObject () {
14+ $ this ->tce = t3lib_div::makeInstance ('t3lib_TCEmain ' );
15+ $ this ->tce ->start (Array (), Array ());
16+ }
17+
18+ /**
19+ * Clear all caches
20+ */
21+ public function clearAllCaches () {
22+ $ this ->tce ->clear_cacheCmd ('all ' );
23+ }
24+
25+ /**
26+ *
27+ */
28+ public function clearPageCache () {
29+ $ this ->tce ->clear_cacheCmd ('pages ' );
30+ }
31+
32+ /**
33+ *
34+ */
35+ public function clearConfigurationCache () {
36+ $ this ->tce ->clear_cacheCmd ('temp_cached ' );
37+ }
38+
39+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ class Tx_Coreapi_Service_DatabaseApiService {
4+
5+ /*
6+ site:info Provides some basic site status
7+
8+ site:importDatabaseTable Imports a given database table (e.g. a static table)
9+
10+ site:upgrade Upgrades a TYPO3 site to the most recent release
11+ site:upgradeDatabase Executes the database compare task and executes the required changes.
12+ site:upgradeWizard Executes the upgrade wizards.
13+
14+ user:list Provides a basic list of available backend users
15+ */
16+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ class Tx_Coreapi_Service_ExtensionApiService {
4+
5+ /*
6+
7+ extension Provides some basic information on the site's extension status
8+ extension:info Fetches the latest (or provided) version of an extension from TER
9+ extension:list Lists all available extensions of a site
10+ extension:search Searches for an extension in the TER
11+ extension:fetch Fetches the latest (or provided) version of an extension from TER
12+ extension:install Installs the latest (or provided) version of an extension
13+ extension:uninstall Uninstalls an extension
14+ extension:refresh Refreshes the local cache of all extensions available in TER
15+
16+ */
17+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ $ EM_CONF [$ _EXTKEY ] = array (
4+ 'title ' => 'coreapi ' ,
5+ 'description ' => 'coreapi ' ,
6+ 'category ' => 'plugin ' ,
7+ 'author ' => 'Tobias Liebig ' ,
8+ 'author_email ' =>
'[email protected] ' ,
9+ 'author_company ' => '' ,
10+ 'shy ' => '' ,
11+ 'priority ' => '' ,
12+ 'module ' => '' ,
13+ 'state ' => 'alpha ' ,
14+ 'internal ' => '' ,
15+ 'uploadfolder ' => '1 ' ,
16+ 'createDirs ' => '' ,
17+ 'modify_tables ' => '' ,
18+ 'clearCacheOnLoad ' => 0 ,
19+ 'lockType ' => '' ,
20+ 'version ' => '0.0.1 ' ,
21+ 'constraints ' => array (
22+ 'depends ' => array (
23+ 'cms ' => '' ,
24+ 'extbase ' => '' ,
25+ 'fluid ' => '' ,
26+ ),
27+ 'conflicts ' => array (
28+ ),
29+ 'suggests ' => array (
30+ ),
31+ ),
32+ );
33+
34+ ?>
Original file line number Diff line number Diff line change 1+ <?php
2+ if (!defined ('TYPO3_MODE ' )) die ('Access denied. ' );
3+
4+ if (TYPO3_MODE === 'BE ' ) {
5+ // register setup command
6+ $ GLOBALS ['TYPO3_CONF_VARS ' ]['SC_OPTIONS ' ]['extbase ' ]['commandControllers ' ][] = 'Tx_Coreapi_Controller_ApiCommandController ' ;
7+ }
8+
9+ ?>
You can’t perform that action at this time.
0 commit comments