1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
ad.php
См. документацию.
1<?php
2
4
5final class Ad
6{
7 public function __construct(
8 public readonly int $id,
9 public readonly ?string $title,
10 public readonly ?string $href,
11 )
12 {}
13
14 public static function makeFromArray(array $fields): self
15 {
16 [$title, $href] = match($fields['Type'])
17 {
18 'TEXT_AD' => [$fields['TextAd']['Title'] ?? '', $fields['TextAd']['Href'] ?? ''],
19 'IMAGE_AD' => ['', $fields['TextImageAd']['Href'] ?? ''],
20 default => ['', ''],
21 };
22
23 return new self(
24 id: (int)$fields['Id'],
25 title: (string)($title ?? ''),
26 href: (string)($href ?? ''),
27 );
28 }
29}
__construct(public readonly int $id, public readonly ?string $title, public readonly ?string $href,)
Определения ad.php:7
static makeFromArray(array $fields)
Определения ad.php:14
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
<? endif;?> window document title
Определения prolog_main_admin.php:76
$title
Определения pdf.php:123
$fields
Определения yandex_run.php:501