Skip to content

Commit

Permalink
Add DAO tag
Browse files Browse the repository at this point in the history
  • Loading branch information
m-pilarczyk committed Nov 2, 2022
1 parent 55573f6 commit 737e925
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions src/Entity/ArticleTag.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,35 @@

enum ArticleTag: string
{
case AdTech = 'AdTech';
case Announcement = 'Announcement';
case AdTech = 'adtech';
case Announcement = 'announcement';
case AdServer = 'adserver';
case Application = 'application';
case Blockchain = 'blockchain';
case Coin = 'coin';
case Community = 'community';
case DAO = 'dao';
case Ecosystem = 'ecosystem';
case Media = 'media';
case Metaverse = 'metaverse';
case Protocol = 'protocol';
case Technical = 'Technical';
case Technical = 'technical';
case Wallet = 'wallet';

public function label(): string
{
return match ($this) {
self::AdTech => 'Ad Tech',
default => $this->name,
};
}

public static function options(): array
{
$options = [];
foreach (self::cases() as $case) {
$options[$case->label()] = $case->value;
}
return $options;
}
}

0 comments on commit 737e925

Please sign in to comment.