Files
kupshop/bundles/KupShop/ComponentsBundle/Twig/ComponentTrait.php
2025-08-02 16:30:27 +02:00

30 lines
537 B
PHP

<?php
namespace KupShop\ComponentsBundle\Twig;
trait ComponentTrait
{
public int $version;
public string $shortName;
protected bool $isBaseView = false;
public function setConfiguration(int $version, string $shortName): self
{
$this->version = $version;
$this->shortName = $shortName;
return $this;
}
public function getClassName(): string
{
return "c-{$this->shortName}";
}
public function isBaseView(): bool
{
return $this->isBaseView;
}
}