2declare(strict_types=1);
4namespace Bitrix\Landing\Copilot\Data\Node;
7use Bitrix\Landing\Copilot\Data;
8use Bitrix\Landing\Copilot\Data\Type\NodeType;
12 protected const TYPE =
null;
26 $this->placeholders =
$data[
'placeholders'] ?? [];
28 $this->promptTexts = (
$data[
'promptTexts'] ??
null);
49 return $this->block ??
null;
72 NodeType::Img =>
new Img($code,
$data),
92 return $this->placeholders;
97 return $this->isAvatarNode;
107 if ($this->promptTexts ===
null)
109 $this->promptTexts = [];
111 $this->promptTexts = array_merge($this->promptTexts,
$promptTexts);
118 return $this->promptTexts;
156 if (in_array(
$type, NodeType::cases(),
true))
180 $isSiteExists = $this->block->getParentSite()?->getSiteId();
181 $isLandingExists = $this->block->getParentSite()?->getLandingId();
198 if (!isset($this->blockInstance))
200 $blockId = $this->block->getId();
215 return $this->blockInstance;
static fromArray(array $data)
Landing Block $blockInstance
__construct(string $code, array $data)
static create(NodeType $type, string $code, array $data)
getValues(?int $position=null)
addPromptTexts(array $promptTexts)
toLanding(?int $position=null)
setParentBlock(Data\Block $block)
setPromptTexts(array $promptTexts)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code