• Модуль: seo
  • Путь к файлу: ~/bitrix/modules/seo/classes/general/seo_keywords.php
  • Класс: CSeoKeywords
  • Вызов: CSeoKeywords::Add
static function Add($arFields)
{
	global $APPLICATION, $DB;
	
	if (!CSeoKeywords::CheckFields('ADD', $arFields))
	{
		return false;
	}

	$arAllFields = array('URL', 'SITE_ID', 'KEYWORDS');
	
	$arInsert = array();
	foreach ($arFields as $key => $value)
	{
		if (in_array($key, $arAllFields))
		{
			$arInsert[$key] = "'".($key == 'SITE_ID' ? $DB->ForSql($value, 2) : $DB->ForSql($value))."'";
		}
	}
	
	$ID = $DB->Insert('b_seo_keywords', $arInsert);
	return $ID;
}