Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
FacebookRefreshTimer.php
1
<?php
2
3
namespace
Bitrix\Catalog\v2\Integration\Seo\Facebook
;
4
5
use
Bitrix\Main\Config\Option
;
6
7
final
class
FacebookRefreshTimer
8
{
9
private
const
OPTION_NAME =
'facebook_last_refreshed_product_timestamp'
;
10
11
public
static
function
getLastRefreshedTimestamp
(): int
12
{
13
// ToDo return (int)Option::get('catalog', self::OPTION_NAME, 0);
14
// last 3 days right now
15
return
time() - 3 * 24 * 60 * 60;
16
}
17
18
public
static
function
setLastRefreshedTimestamp
(
int
$timestamp): void
19
{
20
Option::set(
'catalog'
, self::OPTION_NAME, $timestamp);
21
}
22
}
Bitrix\Catalog\v2\Integration\Seo\Facebook\FacebookRefreshTimer
Definition
FacebookRefreshTimer.php:8
Bitrix\Catalog\v2\Integration\Seo\Facebook\FacebookRefreshTimer\setLastRefreshedTimestamp
static setLastRefreshedTimestamp(int $timestamp)
Definition
FacebookRefreshTimer.php:18
Bitrix\Catalog\v2\Integration\Seo\Facebook\FacebookRefreshTimer\getLastRefreshedTimestamp
static getLastRefreshedTimestamp()
Definition
FacebookRefreshTimer.php:11
Bitrix\Main\Config\Option
Definition
option.php:15
Bitrix\Catalog\v2\Integration\Seo\Facebook
Definition
FacebookAgent.php:3
modules
catalog
lib
v2
Integration
Seo
Facebook
FacebookRefreshTimer.php
Создано системой
1.10.0