Files
aux-bieaux-legumes/local/modules/Agenda/Model/AgendaContentDate.php

37 lines
997 B
PHP

<?php
namespace Agenda\Model;
use Agenda\Model\Base\AgendaContentDate as BaseAgendaContentDate;
/**
* Skeleton subclass for representing a row from the 'agenda_content_date' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
*/
class AgendaContentDate extends BaseAgendaContentDate
{
public function getJsonArray(string $locale): array
{
$content = $this->getContent()->setLocale($locale);
return [
"id" => $this->id,
"contentId" => $this->content_id,
"start" => $this->date_debut,
"end" => $this->date_fin,
"hours" => $this->heure,
"title" => $content->getTitle(),
"chapo" => $content->getChapo(),
"description" => $content->getDescription(),
"url" => $content->getUrl($locale)
];
}
}