<dl>
<dt>TODO: License Number</dt>
+ {* TODO: The WoltLab Cloud does not really follows the concept of
+ license numbers therefore this needs to be hidden for these. *}
<dd>{$licenseNumber}</dd>
</dl>
<dl>
<dt>TODO: License Type</dt>
+ {* TODO: Do we want to display additional information depending on the
+ license type? This could be useful for WoltLab Cloud installations
+ to show the subscription name. But this could also show a reminder
+ for developer licenses that they only qualify for demo/testing
+ purpose and not for production sites. *}
<dd>{$licenseData[license][type]}</dd>
</dl>
</section>
<tbody>
{foreach from=$licenseData[woltlab] key=package item=majorVersion}
<tr>
+ {* TODO: Install button? *}
+
<td>{$package}</td>
<td>{$majorVersion}</td>
+
+ {* TODO: We might want to suggest upgrading the license
+ if we can determine that this is an outdated version.
+ Maybe we can deeplink the LicenseExtend page here? *}
</tr>
{/foreach}
</tbody>
<tbody>
{foreach from=$licenseData[pluginstore] key=package item=majorVersion}
<tr>
+ {* TODO: Install button? *}
+
<td>{$package}</td>
<td>{$majorVersion}</td>
+
+ {* TODO: Are we able to suggest if there is a newer
+ version available? And if yes, how do we display this
+ without breaking the version filter? Or does it only
+ affect the availibility of the install button and not
+ the row itself? *}
+
+ {* TODO: Do we want to display the time of purchase here? *}
</tr>
{/foreach}
</tbody>
final class LicensePage extends AbstractPage
{
+ // TODO: This should be the actual menu item.
public $activeMenuItem = 'wcf.acp.menu.link.package';
+ // TODO: This untyped array is awful, maybe use a custom object intead and
+ // ask Valinor to hydrate it?
private array $licenseData;
+
+ // TODO: This could be part of the aforementioned custom object.
private int $licenseNumber;
public function readData()
{
parent::readData();
+ // TODO: We actually need to fetch the data from the official package
+ // update servers first, because we rely on the human readable names.
+
+ // TODO: We should cache this data for a certain amount of time. There
+ // also needs tobe a way to manually trigger a refresh in case of a
+ // recent purchase.
$this->licenseData = $this->fetchLicenseData();
+ // TODO: This might need to use `getAuthData()` to inject the correct
+ // credentials for the WoltLab Cloud.
$this->licenseNumber = (new PackageUpdateServer(1))->loginUsername;
+
+ // TODO: We need the data from the official package update servers to
+ // determine the human readable values for each package and to filter
+ // out those that are incompatible with the installed version.
}
public function assignVariables()