Administration/views/main/view.admin.cache.php
Abel Hoogeveen 63ea659d5b All changes as implemented over the last 3 years.
Pushes Administration into a workable state.
2023-02-08 12:57:10 +01:00

32 lines
988 B
PHP

<?php
namespace Application\View;
use Application\Controller\CacheController;
use FuzeWorks\Administration\AdminView;
use FuzeWorks\Administration\Attributes\DisplayAttribute;
use FuzeWorks\Administration\Attributes\HiddenAttribute;
use FuzeWorks\Administration\Attributes\IconAttribute;
use FuzeWorks\Administration\Attributes\PermissionAttribute;
use FuzeWorks\Administration\Attributes\PriorityAttribute;
use FuzeWorks\Controller;
use FuzeWorks\Factory;
use FuzeWorks\ObjectStorage\ObjectStorageComponent;
use FuzeWorks\Priority;
use Psr\SimpleCache\CacheInterface;
class CacheAdminView extends AdminView
{
/** @var CacheController $controller */
protected Controller $controller;
#[DisplayAttribute("ObjectStorage"), IconAttribute("server"), PriorityAttribute(Priority::LOW)]
#[HiddenAttribute]
#[PermissionAttribute(["ADMIN"])]
public function index()
{
$items = $this->controller->getCacheItems();
return json_encode($items);
}
}