30 lines
537 B
PHP
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;
|
|
}
|
|
}
|