Skip to content

Commit 4c4a154

Browse files
author
Mikhail Yarmoluk
committed
Add base enum "YesNot"
1 parent 6f8473c commit 4c4a154

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

Base/YesNot.php

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
/**
3+
* Created by PhpStorm.
4+
* User: Yarmaliuk Mikhail
5+
* Date: 17.08.18
6+
* Time: 11:58
7+
*/
8+
9+
namespace Kakadu\Yii2Enum\Base;
10+
11+
use Kakadu\Yii2Enum\Enum;
12+
13+
/**
14+
* Class YesNot
15+
* @package Kakadu\Yii2Enum\Base
16+
* @author Yarmaliuk Mikhail
17+
* @version 1.0
18+
*/
19+
class YesNot extends Enum
20+
{
21+
const YES = 1;
22+
const NOT = 0;
23+
24+
/**
25+
* @inheritdoc
26+
*/
27+
public static function all(): array
28+
{
29+
return [
30+
self::YES => \Yii::t('app', 'Yes'),
31+
self::NOT => \Yii::t('app', 'Not'),
32+
];
33+
}
34+
}

0 commit comments

Comments
 (0)