Advertisement
Guest User

Untitled

a guest
Mar 9th, 2016
668
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1.  
  2. /**
  3. * Aquatuning Software Development - Cache Clear - Bootstrap
  4. *
  5. * @category Aquatuning
  6. * @package Shopware\Plugins\AtsdCacheClear
  7. * @copyright Copyright (c) 2015, Aquatuning GmbH
  8. */
  9.  
  10. // {namespace name="backend/atsd_cache_clear/app"}
  11.  
  12. Ext.define( "Shopware.apps.AtsdCacheClear",
  13. {
  14. // name
  15. name: "Shopware.apps.AtsdCacheClear",
  16.  
  17. // parent
  18. extend: "Enlight.app.SubApplication",
  19.  
  20. // bulkload
  21. bulkLoad: true,
  22.  
  23. // loadpath
  24. loadPath: '{url controller="AtsdCacheClear" action="load"}',
  25.  
  26.  
  27.  
  28. // views
  29. views:
  30. [
  31. ],
  32.  
  33. // stores
  34. stores:
  35. [
  36. ],
  37.  
  38. // models
  39. models:
  40. [
  41. ],
  42.  
  43. // controllers
  44. controllers:
  45. [
  46. "Main"
  47. ],
  48.  
  49.  
  50.  
  51. // launch the app
  52. launch: function()
  53. {
  54. // get this
  55. var me = this;
  56.  
  57. // get the controller
  58. var mainController = me.getController( "Main" );
  59.  
  60.  
  61.  
  62. // any action given?
  63. switch ( me.action )
  64. {
  65. // only http
  66. case "Index.Http":
  67. mainController.clearCache( "http" );
  68. break;
  69.  
  70. // http, templates
  71. case "Index.Template":
  72. mainController.clearCache( "template" );
  73. break;
  74.  
  75. // http, config
  76. case "Index.Config":
  77. mainController.clearCache( "config" );
  78. break;
  79.  
  80. // http, templates, config
  81. case "Index.Full":
  82. mainController.clearCache( "full" );
  83. break;
  84.  
  85. // default = full cache
  86. // full cache only manual via cache/performance
  87. /*
  88. default:
  89. // clear the cache
  90. mainController.clearCache( "all" );
  91. break;
  92. */
  93.  
  94. // default = error message
  95. default:
  96. Shopware.Notification.createGrowlMessage(
  97. "Aktion abgebrochen",
  98. "Bitte wählen Sie den cache aus, der gelöscht werden soll.",
  99. "ATSD - Shop cache"
  100. );
  101. break;
  102. }
  103. }
  104.  
  105. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement