Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
factory.php
1<?php
3
4class Factory
5{
6
7 static public function create($type)
8 {
9 if($type == ModeType::DEFAULT_TYPE)
10 {
11 return new DefaultLink();
12 }
13 elseif ($type == ModeType::APP_LAYOUT_TYPE)
14 {
15 return new AppLayoutLink();
16 }
17 else
18 {
19 throw new \Bitrix\Main\NotSupportedException("Mode type: '".$type."' is not supported in current context");
20 }
21 }
22}