Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
attachpropertytype.php
1<?php
2
3
5
6
8{
9 private $attach;
10
11 public static function getInstance($names, AttachProperty $attach): AttachPropertyType
12 {
13 return new self($names, $attach);
14 }
15
16 public function __construct($names, AttachProperty $attach)
17 {
18 parent::__construct($names);
19
20 $this->attach = $attach;
21
22 if ($this->attach->name)
23 {
24 $this->addParameter(Parameter::getInstance('FILENAME', $this->attach->name));
25 }
26 }
27
28 public function getValue(): string
29 {
30 return "{$this->attach->url}";
31 }
32
34 {
35 return $this->attach;
36 }
37}
static getInstance($names, AttachProperty $attach)
static getInstance(string $name, string $value, $disableEscaping=false)
Definition parameter.php:13