diff --git a/system/src/Grav/Common/Page/Media.php b/system/src/Grav/Common/Page/Media.php index fb797f76b..178373cf5 100644 --- a/system/src/Grav/Common/Page/Media.php +++ b/system/src/Grav/Common/Page/Media.php @@ -221,15 +221,6 @@ class Media extends AbstractMedia } } - /** - * @return string|null - * @deprecated 1.6 Use $this->getPath() instead. - */ - public function path(): ?string - { - return $this->getPath(); - } - protected function getGrav(): Grav { return Grav::instance(); @@ -249,4 +240,13 @@ class Media extends AbstractMedia { // TODO: Implement clearCache() method. } + + /** + * @return string|null + * @deprecated 1.6 Use $this->getPath() instead. + */ + public function path(): ?string + { + return $this->getPath(); + } } diff --git a/system/src/Grav/Common/Page/Medium/GlobalMedia.php b/system/src/Grav/Common/Page/Medium/GlobalMedia.php index 5198eed97..e20668198 100644 --- a/system/src/Grav/Common/Page/Medium/GlobalMedia.php +++ b/system/src/Grav/Common/Page/Medium/GlobalMedia.php @@ -9,7 +9,9 @@ namespace Grav\Common\Page\Medium; +use Grav\Common\Config\Config; use Grav\Common\Grav; +use Grav\Common\Language\Language; use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator; class GlobalMedia extends AbstractMedia @@ -126,4 +128,24 @@ class GlobalMedia extends AbstractMedia return $medium; } + + protected function getGrav(): Grav + { + return Grav::instance(); + } + + protected function getConfig(): Config + { + return $this->getGrav()['config']; + } + + protected function getLanguage(): Language + { + return $this->getGrav()['language']; + } + + protected function clearCache(): void + { + // TODO: Implement clearCache() method. + } }