mirror of
https://github.com/getgrav/grav.git
synced 2026-07-13 22:03:28 +02:00
Added missing methods into GlobalMedia
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user