Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
roombuilder.php
1<?php
2
4
6
8{
9 private Room $room;
10
14 public function build(): Room
15 {
16 return
17 $this
18 ->getBaseRoom()
19 ->setId($this->getId())
20 ->setLocationId($this->getLocationId())
21 ->setCapacity($this->getCapacity())
22 ->setNecessity($this->getNecessity())
23 ->setName($this->getName())
24 ->setColor($this->getColor())
25 ->setOwnerId($this->getOwnerId())
26 ->setCreatedBy()
27 ->setAccess($this->getAccess())
28 ->setCategoryId($this->getCategoryId())
29 ;
30 }
31
32 abstract function getId();
33 abstract function getLocationId();
34 abstract function getCapacity();
35 abstract function getNecessity();
36 abstract function getName();
37 abstract function getColor();
38 abstract function getOwnerId();
39 abstract function getAccess();
40 abstract function getCategoryId();
41
45 protected function getBaseRoom(): Room
46 {
47 if(empty($this->room))
48 {
49 $this->room = new Room();
50 }
51
52 return $this->room;
53 }
54}
setId(?int $id=null)
Definition room.php:91