removes month and day from site meta date value
This commit is contained in:
parent
75d215cc56
commit
8f21090659
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
namespace ArchiveSiteMeta\Site\BlockLayout;
|
namespace ArchiveSiteMeta\Site\BlockLayout;
|
||||||
|
|
||||||
|
use DateTime;
|
||||||
use Omeka\Api\Representation\SiteRepresentation;
|
use Omeka\Api\Representation\SiteRepresentation;
|
||||||
use Omeka\Api\Representation\SitePageRepresentation;
|
use Omeka\Api\Representation\SitePageRepresentation;
|
||||||
use Omeka\Api\Representation\SitePageBlockRepresentation;
|
use Omeka\Api\Representation\SitePageBlockRepresentation;
|
||||||
|
@ -8,13 +9,11 @@ use Omeka\Site\BlockLayout\AbstractBlockLayout;
|
||||||
use Laminas\View\Renderer\PhpRenderer;
|
use Laminas\View\Renderer\PhpRenderer;
|
||||||
|
|
||||||
use ArchiveSiteMeta\Site\BlockLayout\ContainerInterface;
|
use ArchiveSiteMeta\Site\BlockLayout\ContainerInterface;
|
||||||
|
|
||||||
use Laminas\Form\Element;
|
use Laminas\Form\Element;
|
||||||
|
|
||||||
use Laminas\Form\FormElementManager;
|
use Laminas\Form\FormElementManager;
|
||||||
|
|
||||||
use ArchiveSiteMeta\Form\ArchiveSiteMetaBlockForm;
|
use ArchiveSiteMeta\Form\ArchiveSiteMetaBlockForm;
|
||||||
|
|
||||||
|
|
||||||
class ArchiveSiteMeta extends AbstractBlockLayout
|
class ArchiveSiteMeta extends AbstractBlockLayout
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
@ -107,9 +106,10 @@ class ArchiveSiteMeta extends AbstractBlockLayout
|
||||||
}
|
}
|
||||||
$archiveSiteHelper = $view->getHelperPluginManager()->get('archiveSiteMeta');
|
$archiveSiteHelper = $view->getHelperPluginManager()->get('archiveSiteMeta');
|
||||||
$collections = $archiveSiteHelper->getCollections();
|
$collections = $archiveSiteHelper->getCollections();
|
||||||
|
$date = new DateTime($block->dataValue('project_date'));
|
||||||
return $view->partial('common/block-layout/site-meta', [
|
return $view->partial('common/block-layout/site-meta', [
|
||||||
'artist' =>$block->dataValue('currator'),
|
'artist' =>$block->dataValue('currator'),
|
||||||
'project_date' => $block->dataValue('project_date'),
|
'project_date' => $date->format('Y'),
|
||||||
'collection' => $collections[$block->dataValue('collection')],
|
'collection' => $collections[$block->dataValue('collection')],
|
||||||
'site' => $site,
|
'site' => $site,
|
||||||
'tech_document_link' => $tech_document_link
|
'tech_document_link' => $tech_document_link
|
||||||
|
|
Loading…
Reference in New Issue