use wcf\system\form\builder\field\devtools\project\DevtoolsProjectInstructionsFormField;
use wcf\system\form\builder\field\devtools\project\DevtoolsProjectOptionalPackagesFormField;
use wcf\system\form\builder\field\devtools\project\DevtoolsProjectRequiredPackagesFormField;
-use wcf\system\form\builder\field\MultipleSelectionFormField;
use wcf\system\form\builder\field\RadioButtonFormField;
use wcf\system\form\builder\field\TextFormField;
use wcf\system\form\builder\field\UrlFormField;
);
$dataTab->appendChild($authorInformation);
- $compatibility = FormContainer::create('compatibility')
- ->label('wcf.acp.devtools.project.compatibility')
- ->appendChildren([
- MultipleSelectionFormField::create('apiVersions')
- ->label('wcf.acp.devtools.project.apiVersions')
- ->description('wcf.acp.devtools.project.apiVersions.description')
- ->options(static function () {
- $apiVersions = \array_filter(\array_merge(
- WCF::getSupportedLegacyApiVersions(),
- [WSC_API_VERSION]
- ), static function ($value) {
- return $value !== 2017;
- });
-
- \sort($apiVersions);
-
- return \array_combine($apiVersions, $apiVersions);
- })
- ->available($this->formObject === null || !$this->formObject->isCore()),
- ])
- ->addDependency(
- ValueFormFieldDependency::create('mode')
- ->field($mode)
- ->values(['edit', 'setup'])
- );
- $dataTab->appendChild($compatibility);
-
$requiredPackages = FormContainer::create('requiredPackagesContainer')
->label('wcf.acp.devtools.project.requiredPackages')
->description('wcf.acp.devtools.project.requiredPackages.description')
use wcf\system\form\builder\field\devtools\project\DevtoolsProjectInstructionsFormField;
use wcf\system\form\builder\field\devtools\project\DevtoolsProjectOptionalPackagesFormField;
use wcf\system\form\builder\field\devtools\project\DevtoolsProjectRequiredPackagesFormField;
-use wcf\system\form\builder\field\MultipleSelectionFormField;
use wcf\system\form\builder\field\TextFormField;
use wcf\system\language\LanguageFactory;
use wcf\system\WCF;
$authorUrl->value($packageArchive->getAuthorInfo('authorURL'));
}
- /** @var MultipleSelectionFormField $apiVersions */
- $apiVersions = $this->form->getNodeById('apiVersions');
- $apiVersions->value($packageArchive->getCompatibleVersions());
-
$requirements = $packageArchive->getRequirements();
if (!empty($requirements)) {
$requirementData = [];
$this->writeRequiredPackages();
$this->writeOptionalPackages();
$this->writeExcludedPackages();
- $this->writeCompatibility();
$this->writeInstructions();
$this->xmlWriter->endDocument($this->project->getPackageXmlPath());
$this->xmlWriter->endElement();
}
- /**
- * Writes the `compatibility` element.
- */
- protected function writeCompatibility()
- {
- if (empty($this->packageXmlData['apiVersions'])) {
- return;
- }
-
- $this->xmlWriter->startElement('compatibility');
-
- foreach ($this->packageXmlData['apiVersions'] as $apiVersion) {
- $this->xmlWriter->writeElement('api', '', ['version' => $apiVersion]);
- }
-
- $this->xmlWriter->endElement();
- }
-
/**
* Writes the `optionalpackages` element.
*/
<item name="wcf.acp.devtools.project.requiredPackages.description"><![CDATA[Um dieses Paket installieren zu können, müssen die folgenden Paketen bereits installiert sein oder die mitgelieferten Versionen müssen vorher installiert werden.]]></item>
<item name="wcf.acp.devtools.project.excludedPackages"><![CDATA[Inkompatible Pakete]]></item>
<item name="wcf.acp.devtools.project.excludedPackages.description"><![CDATA[Dieses Paket kann nicht installiert werden, wenn eines der folgenden Pakete (in der angegebenen <strong>oder neueren</strong> Version) bereits installiert ist.]]></item>
- <item name="wcf.acp.devtools.project.compatibility"><![CDATA[API-Kompatibilität]]></item>
<item name="wcf.acp.devtools.project.excludedPackage.excludedPackage"><![CDATA[<kbd>{$packageIdentifier}</kbd>
{if $version}
<dl class="plain inlineDataList small">
<item name="wcf.acp.devtools.project.optionalPackage.packageIdentifier.description"><![CDATA[Der Pfad zur Paketdatei muss <kbd>optionals/{literal}{$packageIdentifier}{/literal}.tar</kbd> lauten.]]></item>
<item name="wcf.acp.devtools.project.optionalPackages"><![CDATA[Optionale Pakete]]></item>
<item name="wcf.acp.devtools.project.optionalPackages.description"><![CDATA[Nach der Installation dieses Pakets werden folgende Pakete als optionale Pakete angeboten.]]></item>
- <item name="wcf.acp.devtools.project.apiVersions"><![CDATA[Kompatible API-Versionen]]></item>
- <item name="wcf.acp.devtools.project.apiVersions.description"><![CDATA[Das Paket ist mit allen ausgewählten API-Versionen von WoltLab Suite Core kompatibel.]]></item>
<item name="wcf.acp.devtools.project.requiredPackages.shortTitle"><![CDATA[Voraussetzungen]]></item>
<item name="wcf.acp.devtools.project.excludedPackages.shortTitle"><![CDATA[Inkompatibilität]]></item>
<item name="wcf.acp.devtools.project.optionalPackages.shortTitle"><![CDATA[Optionales]]></item>
<item name="wcf.acp.option.blacklist_user_agents.description"/>
<item name="wcf.global.form.error.lessThan.javaScript"/>
<item name="wcf.global.form.error.greaterThan.javaScript"/>
+ <item name="wcf.acp.devtools.project.compatibility"/>
+ <item name="wcf.acp.devtools.project.apiVersions"/>
+ <item name="wcf.acp.devtools.project.apiVersions.description"/>
</delete>
</language>
<item name="wcf.acp.devtools.project.requiredPackages.description"><![CDATA[In order to install this package, the following packages have to be already installed or the versions delivered together with the package have to be installed first.]]></item>
<item name="wcf.acp.devtools.project.excludedPackages"><![CDATA[Conflicting Packages]]></item>
<item name="wcf.acp.devtools.project.excludedPackages.description"><![CDATA[This package cannot be installed if one of the following packages is already installed (in the specified <strong>or new</strong> version).]]></item>
- <item name="wcf.acp.devtools.project.compatibility"><![CDATA[API Compatibility]]></item>
<item name="wcf.acp.devtools.project.excludedPackage.excludedPackage"><![CDATA[<kbd>{$packageIdentifier}</kbd>
{if $version}
<dl class="plain inlineDataList small">
<item name="wcf.acp.devtools.project.optionalPackage.packageIdentifier.description"><![CDATA[The path to the package file has to be <kbd>optionals/{literal}{$packageIdentifier}{/literal}.tar</kbd>.]]></item>
<item name="wcf.acp.devtools.project.optionalPackages"><![CDATA[Optional Packages]]></item>
<item name="wcf.acp.devtools.project.optionalPackages.description"><![CDATA[The following packages will be offered to be installed optionally after this package has been installed.]]></item>
- <item name="wcf.acp.devtools.project.apiVersions"><![CDATA[Compatible API Versions]]></item>
- <item name="wcf.acp.devtools.project.apiVersions.description"><![CDATA[The package is compatible with all of the selected API versions of WoltLab Suite Core.]]></item>
<item name="wcf.acp.devtools.project.requiredPackages.shortTitle"><![CDATA[Requirements]]></item>
<item name="wcf.acp.devtools.project.excludedPackages.shortTitle"><![CDATA[Conflicts]]></item>
<item name="wcf.acp.devtools.project.optionalPackages.shortTitle"><![CDATA[Optional]]></item>
<item name="wcf.acp.option.blacklist_user_agents.description"/>
<item name="wcf.global.form.error.lessThan.javaScript"/>
<item name="wcf.global.form.error.greaterThan.javaScript"/>
+ <item name="wcf.acp.devtools.project.compatibility"/>
+ <item name="wcf.acp.devtools.project.apiVersions"/>
+ <item name="wcf.acp.devtools.project.apiVersions.description"/>
</delete>
</language>