]> git.mxchange.org Git - friendica.git/commitdiff
Remove deprecated App::registerStylesheet()/FooterScript() - replace with DI::page...
authornupplaPhil <admin@philipp.info>
Mon, 16 Dec 2019 00:08:47 +0000 (01:08 +0100)
committernupplaPhil <admin@philipp.info>
Sun, 29 Dec 2019 19:17:49 +0000 (20:17 +0100)
doc/Addons.md
src/App.php

index 06b05bdff5c14ef0431d10f95cd3d6d89903b100..6e975650034c332ff8907e0c5654abafd6649647 100644 (file)
@@ -104,7 +104,7 @@ function <addon>_install()
 
 function <addon>_head(App $a)
 {
-       $a->registerStylesheet(__DIR__ . '/relative/path/to/addon/stylesheet.css');
+       \Friendica\DI::page()->registerStylesheet(__DIR__ . '/relative/path/to/addon/stylesheet.css');
 }
 ```
 
@@ -126,7 +126,7 @@ function <addon>_install()
 
 function <addon>_footer(App $a)
 {
-       $a->registerFooterScript(__DIR__ . '/relative/path/to/addon/script.js');
+       \Friendica\DI::page()->registerFooterScript(__DIR__ . '/relative/path/to/addon/script.js');
 }
 ```
 
index a8650de389ad4c1e09ae49907353a4f5442cd250..5c2118f73d63c0e841bf46b91731270d4f77d1ae 100644 (file)
@@ -153,24 +153,6 @@ class App
                return $this->config->getCache()->get('system', 'basepath');
        }
 
-       /**
-        * @deprecated 2019.09 - use Page->registerStylesheet instead
-        * @see        Page::registerStylesheet()
-        */
-       public function registerStylesheet($path)
-       {
-               $this->page->registerStylesheet($path);
-       }
-
-       /**
-        * @deprecated 2019.09 - use Page->registerFooterScript instead
-        * @see        Page::registerFooterScript()
-        */
-       public function registerFooterScript($path)
-       {
-               $this->page->registerFooterScript($path);
-       }
-
        /**
         * @param Database        $database The Friendica Database
         * @param Configuration   $config   The Configuration