cleaner backend project: modified interface for toolbar items to add access chechking
[Packages/TYPO3.CMS.git] / typo3 / classes / class.clearcachemenu.php
index 64f74c6..7c35bcb 100644 (file)
@@ -49,10 +49,11 @@ class ClearCacheMenu implements backend_toolbarItem {
        /**
         * constructor
         *
-        * @return      void
+        * @param       TYPO3backend    TYPO3 backend object reference
         */
-       public function __construct() {
-               $this->cacheActions = array();
+       public function __construct(TYPO3backend &$backendReference) {
+               $this->backendReference = $backendReference;
+               $this->cacheActions     = array();
 
                        // Clear cache for ALL tables!
                $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:rm.clearCache_all');
@@ -83,16 +84,16 @@ class ClearCacheMenu implements backend_toolbarItem {
                        );
                }
 
-
        }
 
        /**
-        * sets the backend reference
+        * checks whether the user has access to this toolbar item
         *
-        * @param TYPO3backend backend object reference
+        * @return  boolean  true if user has access, false if not
         */
-       public function setBackend(&$backendReference) {
-               $this->backendReference = $backendReference;
+       public function checkAccess() {
+                       // FIXME - needs proper access check
+               return true;
        }
 
        /**