29 $lastId = Option::get(
'landing', self::OPTION_CODE, 0);
34 $res = BlockTable::getList([
41 if ($row = $res->fetch())
43 $result[
'count'] = $row[
'CNT'];
47 $res = BlockTable::getList([
58 'SITE_ID' =>
'LANDING.SITE_ID',
68 while ($row = $res->fetch())
73 $block =
new Block($row[
'ID'], $row);
74 $searchContent = $block->getSearchContent();
78 BlockTable::update($row[
'ID'], [
79 'SEARCH_CONTENT' => $searchContent
88 Option::set(
'landing', self::OPTION_CODE, $lastId);
93 Option::delete(
'landing', [
'name' => self::OPTION_CODE]);