Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Aquatuning Software Development - Cache Clear - Bootstrap
- *
- * @category Aquatuning
- * @package Shopware\Plugins\AtsdCacheClear
- * @copyright Copyright (c) 2015, Aquatuning GmbH
- */
- // {namespace name="backend/atsd_cache_clear/app"}
- Ext.define( "Shopware.apps.AtsdCacheClear",
- {
- // name
- name: "Shopware.apps.AtsdCacheClear",
- // parent
- extend: "Enlight.app.SubApplication",
- // bulkload
- bulkLoad: true,
- // loadpath
- loadPath: '{url controller="AtsdCacheClear" action="load"}',
- // views
- views:
- [
- ],
- // stores
- stores:
- [
- ],
- // models
- models:
- [
- ],
- // controllers
- controllers:
- [
- "Main"
- ],
- // launch the app
- launch: function()
- {
- // get this
- var me = this;
- // get the controller
- var mainController = me.getController( "Main" );
- // any action given?
- switch ( me.action )
- {
- // only http
- case "Index.Http":
- mainController.clearCache( "http" );
- break;
- // http, templates
- case "Index.Template":
- mainController.clearCache( "template" );
- break;
- // http, config
- case "Index.Config":
- mainController.clearCache( "config" );
- break;
- // http, templates, config
- case "Index.Full":
- mainController.clearCache( "full" );
- break;
- // default = full cache
- // full cache only manual via cache/performance
- /*
- default:
- // clear the cache
- mainController.clearCache( "all" );
- break;
- */
- // default = error message
- default:
- Shopware.Notification.createGrowlMessage(
- "Aktion abgebrochen",
- "Bitte wählen Sie den cache aus, der gelöscht werden soll.",
- "ATSD - Shop cache"
- );
- break;
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement