Skip to content

Commit 8361c12

Browse files
committed
bump changes
1 parent 75c8e2f commit 8361c12

File tree

4 files changed

+98
-1
lines changed

4 files changed

+98
-1
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
namespace wcf\system\form\builder\container;
4+
5+
use wcf\system\form\builder\data\processor\CustomFormDataProcessor;
6+
use wcf\system\form\builder\IFormDocument;
7+
8+
class RecurringElementsFormContainer extends FormContainer {
9+
/**
10+
* @inheritDoc
11+
*/
12+
public function populate() {
13+
parent::populate();
14+
15+
$this->getDocument()->getDataHandler()->addProcessor(new CustomFormDataProcessor($this->getId(), function(IFormDocument $document, array $parameters) {
16+
return $parameters;
17+
}));
18+
19+
return $this;
20+
}
21+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace wcf\system\form\builder\container;
4+
5+
class RegisterFormContainer extends FormContainer {
6+
/**
7+
* @inheritDoc
8+
*/
9+
public function populate() {
10+
$this->appendChildren([
11+
12+
]);
13+
}
14+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?php
2+
3+
namespace wcf\system\form\builder\data\processor;
4+
5+
use wcf\data\IStorableObject;
6+
use wcf\system\form\builder\IFormDocument;
7+
8+
class RecurringElementsFormDataProcessor extends AbstractFormDataProcessor {
9+
/**
10+
* processor id primarily used for error messages
11+
* @var string
12+
*/
13+
protected $id;
14+
15+
/**
16+
* @var string
17+
*/
18+
protected $wrapperProperty;
19+
20+
/**
21+
* Initializes a new RecurringElementsFormDataProcessor object.
22+
*
23+
* @param string $id processor id primarily used for error messages, does not have to be unique
24+
* @param string $wrapperProperty
25+
*
26+
* @throws \InvalidArgumentException if either id or processor callable are invalid
27+
*/
28+
public function __construct($id, $wrapperProperty) {
29+
if (preg_match('~^[a-z][A-z0-9-]*$~', $id) !== 1) {
30+
throw new \InvalidArgumentException("Invalid id '{$id}' given.");
31+
}
32+
33+
$this->id = $id;
34+
$this->wrapperProperty = $wrapperProperty;
35+
}
36+
37+
/**
38+
* @inheritDoc
39+
*/
40+
public function processFormData(IFormDocument $document, array $parameters) {
41+
wcfDebug($document, $parameters);
42+
43+
return $parameters;
44+
}
45+
46+
/**
47+
* @inheritDoc
48+
*/
49+
public function processObjectData(IFormDocument $document, array $data, IStorableObject $object) {
50+
wcfDebug($document, $data, $object);
51+
52+
return $data;
53+
}
54+
}

package.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,27 @@
1313
</compatibility>
1414

1515
<requiredpackages>
16-
<requiredpackage minversion="5.2.0 Beta 2"><![CDATA[com.woltlab.wcf]]></requiredpackage>
16+
<requiredpackage minversion="5.2.9"><![CDATA[com.woltlab.wcf]]></requiredpackage>
1717
</requiredpackages>
1818

19+
<excludedpackages>
20+
<excludedpackage version="5.4.0 Alpha 1"><![CDATA[com.woltlab.wcf]]></excludedpackage>
21+
</excludedpackages>
22+
1923
<authorinformation>
2024
<author><![CDATA[Florian Gail]]></author>
2125
<authorurl><![CDATA[https://www.mysterycode.de]]></authorurl>
2226
</authorinformation>
2327

2428
<instructions type="install">
29+
<instruction type="acpTemplate" />
30+
<instruction type="template" />
2531
<instruction type="file" />
2632
</instructions>
2733

2834
<instructions type="update" fromversion="1.0.0 Alpha *">
35+
<instruction type="acpTemplate" />
36+
<instruction type="template" />
2937
<instruction type="file" />
3038
</instructions>
3139
</package>

0 commit comments

Comments
 (0)