Resolve language item-related PIP GUI todos
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / system / package / PackageInstallationStep.class.php
1 <?php
2 namespace wcf\system\package;
3 use wcf\system\form\FormDocument;
4
5 /**
6 * Represents step information within an installation node.
7 *
8 * @author Alexander Ebert
9 * @copyright 2001-2018 WoltLab GmbH
10 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
11 * @package WoltLabSuite\Core\System\Package
12 */
13 class PackageInstallationStep {
14 /**
15 * form document object
16 * @var FormDocument
17 */
18 protected $document = null;
19
20 /**
21 * next installation node
22 * @var string
23 */
24 protected $node = '';
25
26 /**
27 * indicates if current current node should be splitted
28 * @var boolean
29 */
30 protected $splitNode = false;
31
32 /**
33 * Sets next installation node.
34 *
35 * @param string $node
36 */
37 public function setNode($node) {
38 $this->node = $node;
39 }
40
41 /**
42 * Returns next installation node.
43 *
44 * @return string
45 */
46 public function getNode() {
47 return $this->node;
48 }
49
50 /**
51 * Sets form document object.
52 *
53 * @param FormDocument $document
54 */
55 public function setDocument(FormDocument $document) {
56 $this->document = $document;
57 }
58
59 /**
60 * Returns HTML-representation of form document object.
61 *
62 * @return string
63 */
64 public function getTemplate() {
65 return $this->document->getHTML();
66 }
67
68 /**
69 * Returns true if current step holds a form document object.
70 *
71 * @return boolean
72 */
73 public function hasDocument() {
74 return ($this->document !== null);
75 }
76
77 /**
78 * Enforces node splitting.
79 */
80 public function setSplitNode() {
81 $this->splitNode = true;
82 }
83
84 /**
85 * Returns true if node should be splitted.
86 *
87 * @return boolean
88 */
89 public function splitNode() {
90 return $this->splitNode;
91 }
92 }