mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-10-11 10:08:08 +02:00
Optimized menu
This commit is contained in:
@@ -9,6 +9,21 @@ namespace Infinito\Domain\FixtureManagement\FixtureSource;
|
||||
*/
|
||||
abstract class AbstractFixtureSource implements FixtureSourceInterface
|
||||
{
|
||||
/**
|
||||
* @var string a human readable name
|
||||
*/
|
||||
protected $name = null;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \Infinito\Domain\FixtureManagement\FixtureSource\FixtureSourceInterface::getName()
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->name ?? self::getSlug();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
|
@@ -30,4 +30,9 @@ interface FixtureSourceInterface
|
||||
* @return string|null a fontawesome css class
|
||||
*/
|
||||
public static function getIcon(): string;
|
||||
|
||||
/**
|
||||
* @return string A human readable name, if defined, otherwise a slug
|
||||
*/
|
||||
public function getName(): string;
|
||||
}
|
||||
|
@@ -13,6 +13,11 @@ use Infinito\Domain\FixtureManagement\EntityTemplateFactory;
|
||||
*/
|
||||
final class GuestUserFixtureSource extends AbstractFixtureSource
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $name = 'guest user';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
|
Reference in New Issue
Block a user