Create badgeable trait
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Pcm\BadgeBundle\Trait;
|
||||
|
||||
use Pcm\BadgeBundle\Enum\BadgeColour;
|
||||
|
||||
/**
|
||||
* Provides a default implementation of {@see Pcm\BadgeBundle\Interface\BadgeableInterface}
|
||||
*/
|
||||
trait BadgeableTrait
|
||||
{
|
||||
public function getBadgeColour(): BadgeColour
|
||||
{
|
||||
return BadgeColour::DEFAULT;
|
||||
}
|
||||
|
||||
public function getBadgeIcon(): ?string
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user