Remove deprecated App::registerStylesheet()/FooterScript() - replace with DI::page()->registerStylesheet()/FooterScript()

This commit is contained in:
Philipp Holzer 2019-12-16 01:08:47 +01:00
parent 302cbaa33c
commit c7230932d6
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
2 changed files with 2 additions and 20 deletions

View file

@ -104,7 +104,7 @@ function <addon>_install()
function <addon>_head(App $a) 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) 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');
} }
``` ```

View file

@ -153,24 +153,6 @@ class App
return $this->config->getCache()->get('system', 'basepath'); 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 Database $database The Friendica Database
* @param Configuration $config The Configuration * @param Configuration $config The Configuration