Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
view.php
1<?php
3
7
8class View
9{
11 protected $order;
12
18 function __construct($id)
19 {
20 $id = (int)$id;
21 $this->order = Manager::returnArchivedOrder($id);
22 }
23
27 public function loadOrder()
28 {
29 return $this->order;
30 }
31
39 public function getTemplates()
40 {
41 $schema = $this->getSchema();
42 if ($schema)
43 {
44 return $schema->getBlocks($this->order);
45 }
46 return array();
47 }
48
49 private function getSchema()
50 {
51 $version = $this->order->getVersion();
52 if ($version === 1 || $version === 2)
53 {
54 return new TypeFirst\Schema();
55 }
56
57 return null;
58 }
59}