<?php
declare(strict_types=1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\MappedSuperclass;
/**
* @MappedSuperclass
*/
abstract class BaseDomain
{
/**
* @ORM\ManyToOne(targetEntity=Domain::class, inversedBy="menus")
*/
private $domain;
/**
* @ORM\ManyToOne(targetEntity=DomainLang::class, inversedBy="menus")
*/
private $domainLang;
public function getDomain(): ?Domain
{
return $this->domain;
}
public function setDomain(?Domain $domain): self
{
$this->domain = $domain;
return $this;
}
public function getDomainLang(): ?DomainLang
{
return $this->domainLang;
}
public function setDomainLang(?DomainLang $domainLang): self
{
$this->domainLang = $domainLang;
return $this;
}
public function getMonthName($month)
{
switch ($month) {
case "01":
return 'stycznia';
break;
case "02":
return 'luty';
break;
case "03":
return 'marca';
break;
case "04":
return 'kwietnia';
break;
case "05":
return 'maja';
break;
case "06":
return 'czerwca';
break;
case "07":
return 'lipca';
break;
case "08":
return 'sierpnia';
break;
case "09":
return 'września';
break;
case "10":
return 'października';
break;
case "11":
return 'listopada';
break;
case "12":
return 'grudnia';
break;
}
}
}