3namespace Bitrix\Seo\Sitemap\Internals;
5use \Bitrix\Main\Entity;
6use \Bitrix\Main\Localization\Loc;
7use Bitrix\Seo\Sitemap\Job;
9Loc::loadMessages(__FILE__);
25 return 'b_seo_sitemap';
32 'data_type' =>
'integer',
34 'autocomplete' =>
true,
37 'data_type' =>
'datetime'
40 'data_type' =>
'string',
44 'data_type' =>
'boolean',
45 'values' => [self::INACTIVE, self::ACTIVE]
48 'data_type' =>
'string',
50 'title' => Loc::getMessage(
'SITEMAP_NAME_TITLE'),
53 'data_type' =>
'datetime',
56 'data_type' =>
'text',
67 $arMask = preg_split(
"/[\s,;]+/", $mask);
69 foreach ($arMask as
$key => $subMask)
73 $arMask[
$key] = str_replace(
74 array(
"___ALL___",
"___ONE___"),
76 preg_quote(str_replace(
78 array(
"___ALL___",
"___ONE___"),
89 return "/^(".implode(
'|', $arMask).
")$/iu";
104 if(is_array($arSettings))
108 if(!isset($arSettings[
'DIR']) || !is_array($arSettings[
'DIR']))
110 $arSettings[
'DIR'] =
array();
113 if(isset($arSettings[
'FILE']) && is_array($arSettings[
'FILE']))
115 ksort($arSettings[
'FILE'], SORT_STRING);
117 foreach($arSettings[
'FILE'] as $file => $value)
119 $pos = mb_strrpos($file,
'/');
120 $parentDir = $pos > 0? mb_substr($file, 0, $pos) :
'/';
122 if(isset($arSettings[
'DIR'][$parentDir]) && $arSettings[
'DIR'][$parentDir] == $value)
124 unset($arSettings[
'FILE'][$file]);
129 if(isset($arSettings[
'DIR']) && is_array($arSettings[
'DIR']))
131 krsort($arSettings[
'DIR'], SORT_STRING);
133 foreach($arSettings[
'DIR'] as
$dir => $value)
137 $pos = mb_strrpos(
$dir,
'/');
138 $parentDir = mb_substr(
$dir, 0, $pos);
143 if(isset($arSettings[
'DIR'][$parentDir]) && $arSettings[
'DIR'][$parentDir] == $value)
145 unset($arSettings[
'DIR'][
$dir]);
150 $arSettings[
'DIR'] = array_reverse($arSettings[
'DIR']);
153 if(isset($arSettings[
'IBLOCK_ACTIVE']) && is_array($arSettings[
'IBLOCK_ACTIVE']))
155 foreach($arSettings[
'IBLOCK_ACTIVE'] as
$iblockId => $value)
159 unset($arSettings[
'IBLOCK_LIST'][
$iblockId]);
160 unset($arSettings[
'IBLOCK_SECTION'][
$iblockId]);
161 unset($arSettings[
'IBLOCK_ELEMENT'][
$iblockId]);
162 unset($arSettings[
'IBLOCK_SECTION_SECTION'][
$iblockId]);
163 unset($arSettings[
'IBLOCK_SECTION_ELEMENT'][
$iblockId]);
168 if(isset($arSettings[
'FORUM_ACTIVE']) && is_array($arSettings[
'FORUM_ACTIVE']))
170 foreach($arSettings[
'FORUM_ACTIVE'] as $forumId => $value)
174 unset($arSettings[
'FORUM_TOPIC'][$forumId]);
191 $delRes = self::delete($id);
192 if ($delRes->isSuccess())
static clearBySitemap($sitemapId)
static clearBySitemap($sitemapId)
static clearByPid(int $pid)
static compileMask($mask)
static fullDelete(int $id)
static prepareSettings($arSettings)
const SETTINGS_DEFAULT_FILE_MASK
static clearBySitemap(int $sitemapId)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if(empty($signedUserToken)) $key