From cf81a2d4b5368e5a69e82e95e1242e6a71e21ceb Mon Sep 17 00:00:00 2001 From: SilverFire - Dmitry Naumenko Date: Mon, 21 Mar 2016 19:50:00 +0200 Subject: [PATCH] Added Domain::canRenew() --- src/models/Domain.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/models/Domain.php b/src/models/Domain.php index 9b0015d0..8cd6841a 100644 --- a/src/models/Domain.php +++ b/src/models/Domain.php @@ -452,4 +452,9 @@ public static function getCategoriesCount($zone, $data) return $i; } + + public function canRenew() + { + return in_array($this->state, [static::STATE_OK, static::STATE_EXPIRED]); + } }