Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
loggerdiagbase.php
1<?php
2
3
5
6
9
11{
12 static protected function getNameOptionEndTime()
13 {
14 throw new NotImplementedException('The method getNameOptionEndTime is not implemented.');
15 }
16
17 static protected function getNameOptionIntervalDayOption()
18 {
19 throw new NotImplementedException('The method getNameOptionIntervalDayOption is not implemented.');
20 }
21
22 public static function isOn()
23 {
24 return time() < Option::get("sale", static::getNameOptionEndTime(), 0);
25 }
26
27 public static function enable($endTime = 0)
28 {
29 Option::set("sale", static::getNameOptionEndTime(), intval($endTime));
30 }
31
32 public static function disable()
33 {
34 Option::delete("sale", array("name" => static::getNameOptionEndTime()));
35 }
36
37 public static function getEndTime()
38 {
39 return intval(Option::get("sale", static::getNameOptionEndTime(), 0));
40 }
41
45 static public function getInterval()
46 {
47 $interval = Option::get('sale', static::getNameOptionIntervalDayOption(), 1);
48 return intval($interval)>0 ? $interval:1;
49 }
50}