<?php
namespace Omeka\Site\ResourcePageBlockLayout;

use Omeka\Api\Representation\AbstractResourceEntityRepresentation;
use Laminas\View\Renderer\PhpRenderer;

class MediaRender implements ResourcePageBlockLayoutInterface
{
    public function getLabel() : string
    {
        return 'Media render'; // @translate
    }

    public function getCompatibleResourceNames() : array
    {
        return ['media'];
    }

    public function render(PhpRenderer $view, AbstractResourceEntityRepresentation $resource) : string
    {
        return $view->partial('common/resource-page-block-layout/media-render', ['resource' => $resource]);
    }
}
