</type>
<!-- /user group assignment conditions -->
- <!-- pages -->
- <type>
- <name>com.woltlab.wcf.AccountManagementForm</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\form\AccountManagementForm]]></classname>
- <categoryname>com.woltlab.wcf.user</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.AvatarEditForm</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\form\AvatarEditForm]]></classname>
- <categoryname>com.woltlab.wcf.user</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.DisclaimerForm</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\form\DisclaimerForm]]></classname>
- <categoryname>com.woltlab.wcf.other</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.EmailActivationForm</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\form\EmailActivationForm]]></classname>
- <categoryname>com.woltlab.wcf.user</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.EmailNewActivationCodeForm</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\form\EmailNewActivationCodeForm]]></classname>
- <categoryname>com.woltlab.wcf.user</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.LoginForm</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\form\LoginForm]]></classname>
- <categoryname>com.woltlab.wcf.user</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.LostPasswordForm</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\form\LostPasswordForm]]></classname>
- <categoryname>com.woltlab.wcf.user</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.MailForm</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\form\MailForm]]></classname>
- <categoryname>com.woltlab.wcf.user</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.ModerationActivationForm</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\form\ModerationActivationForm]]></classname>
- <categoryname>com.woltlab.wcf.moderation</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.ModerationReportForm</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\form\ModerationReportForm]]></classname>
- <categoryname>com.woltlab.wcf.moderation</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.NewPasswordForm</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\form\NewPasswordForm]]></classname>
- <categoryname>com.woltlab.wcf.user</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.NotificationSettingsForm</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\form\NotificationSettingsForm]]></classname>
- <categoryname>com.woltlab.wcf.user</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.RegisterActivationForm</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\form\RegisterActivationForm]]></classname>
- <categoryname>com.woltlab.wcf.user</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.RegisterForm</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\form\RegisterForm]]></classname>
- <categoryname>com.woltlab.wcf.user</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.RegisterNewActivationCodeForm</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\form\RegisterNewActivationCodeForm]]></classname>
- <categoryname>com.woltlab.wcf.user</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.SearchForm</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\form\SearchForm]]></classname>
- <categoryname>com.woltlab.wcf.other</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.SettingsForm</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\form\SettingsForm]]></classname>
- <categoryname>com.woltlab.wcf.user</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.SignatureEditForm</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\form\SignatureEditForm]]></classname>
- <options>module_user_signature</options>
- <categoryname>com.woltlab.wcf.user</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.UserSearchForm</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\form\UserSearchForm]]></classname>
- <options>module_members_list</options>
- <categoryname>com.woltlab.wcf.other</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.DeletedContentListPage</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\page\DeletedContentListPage]]></classname>
- <categoryname>com.woltlab.wcf.moderation</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.FollowingPage</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\page\FollowingPage]]></classname>
- <categoryname>com.woltlab.wcf.user</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.IgnoredUsersPage</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\page\IgnoredUsersPage]]></classname>
- <categoryname>com.woltlab.wcf.user</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.MembersListPage</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\page\MembersListPage]]></classname>
- <options>module_members_list</options>
- <categoryname>com.woltlab.wcf.other</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.ModerationListPage</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\page\ModerationListPage]]></classname>
- <categoryname>com.woltlab.wcf.moderation</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.NotificationListPage</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\page\NotificationListPage]]></classname>
- <categoryname>com.woltlab.wcf.user</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.PaidSubscriptionListPage</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\page\PaidSubscriptionListPage]]></classname>
- <options>module_paid_subscription</options>
- <categoryname>com.woltlab.wcf.other</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.RecentActivityListPage</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\page\RecentActivityListPage]]></classname>
- <categoryname>com.woltlab.wcf.other</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.SearchResultPage</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\page\SearchResultPage]]></classname>
- <categoryname>com.woltlab.wcf.other</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.TaggedPage</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\page\TaggedPage]]></classname>
- <options>module_tagging</options>
- <categoryname>com.woltlab.wcf.other</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.TeamPage</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\page\TeamPage]]></classname>
- <options>module_team_page</options>
- <categoryname>com.woltlab.wcf.other</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.UserPage</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\page\UserPage]]></classname>
- <categoryname>com.woltlab.wcf.user</categoryname>
- </type>
- <type>
- <name>com.woltlab.wcf.UsersOnlineListPage</name>
- <definitionname>com.woltlab.wcf.page</definitionname>
- <classname><![CDATA[wcf\page\UsersOnlineListPage]]></classname>
- <categoryname>com.woltlab.wcf.other</categoryname>
- </type>
- <!-- /pages -->
-
<!-- notice conditions -->
<type>
<name>com.woltlab.wcf.page</name>
+++ /dev/null
-<?php
-namespace wcf\system\page;
-use wcf\data\object\type\ObjectType;
-use wcf\data\object\type\ObjectTypeCache;
-use wcf\system\application\ApplicationHandler;
-use wcf\system\exception\SystemException;
-use wcf\system\SingletonFactory;
-use wcf\system\WCF;
-
-/**
- * Manages the available page object types.
- *
- * @author Matthias Schmidt
- * @copyright 2001-2016 WoltLab GmbH
- * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package com.woltlab.wcf
- * @subpackage system.page
- * @category Community Framework
- */
-class PageManager extends SingletonFactory {
- /**
- * list of available page object types
- * @var ObjectType[]
- */
- protected $objectTypes = [];
-
- /**
- * @inheritDoc
- */
- protected function init() {
- $this->objectTypes = ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.page');
- }
-
- /**
- * Returns a list of the available page object types.
- *
- * @return ObjectType[]
- */
- public function getObjectTypes() {
- return $this->objectTypes;
- }
-
- /**
- * Returns an array used to build a page selection. If $application is given,
- * only pages who belong to the application with the given abbreviation
- * are returned.
- *
- * @param string $application
- * @return string[]
- * @throws SystemException
- */
- public function getSelection($application = null) {
- $objectTypes = $this->objectTypes;
-
- // filter by application
- if ($application !== null) {
- // validate application
- if ($application != 'wcf' && ApplicationHandler::getInstance()->getApplication($application) === null) {
- throw new SystemException("Unknown application with abbreviation '".$application."'");
- }
-
- foreach ($objectTypes as $objectTypeName => $objectType) {
- $classNamePieces = explode('\\', $objectType->className);
-
- if ($classNamePieces[0] != $application) {
- unset($objectTypes[$objectTypeName]);
- }
- }
- }
-
- // filter by options
- foreach ($objectTypes as $objectTypeName => $objectType) {
- if (!$objectType->validateOptions()) {
- unset($objectTypes[$objectTypeName]);
- }
- }
-
- $selection = [];
- foreach ($objectTypes as $objectType) {
- $categoryName = WCF::getLanguage()->get('wcf.page.category.'.$objectType->categoryname);
- if (!isset($selection[$categoryName])) {
- $selection[$categoryName] = [];
- }
-
- $selection[$categoryName][$objectType->objectTypeID] = WCF::getLanguage()->get('wcf.page.'.$objectType->objectType);
- }
-
- ksort($selection);
-
- foreach ($selection as &$subSelection) {
- asort($subSelection);
- }
-
- return $selection;
- }
-}