Commit 23a3b5bb authored by samuel.mortenson's avatar samuel.mortenson Committed by Samuel Mortenson

Issue #3048584 by samuel.mortenson: Make as much code internal as possible

parent 3c4503ee
......@@ -9,6 +9,8 @@ use Symfony\Component\Console\Style\SymfonyStyle;
/**
* Contains a base class for Tome commands.
*
* @internal
*/
class CommandBase extends Command {
......
......@@ -11,6 +11,8 @@ use Drush\Drush;
* Contains logic for working around Drush bugs.
*
* @todo Remove when https://github.com/drush-ops/drush/pull/3770 is closed.
*
* @internal
*/
class CliWorkaroundCommands extends DrushCommands {
......
......@@ -6,6 +6,8 @@ use Symfony\Component\Console\Input\InputInterface;
/**
* Contains methods useful for finding the current executable.
*
* @internal
*/
trait ExecutableFinderTrait {
......
......@@ -4,6 +4,8 @@ namespace Drupal\tome_base;
/**
* Contains methods useful for working with paths.
*
* @internal
*/
trait PathTrait {
......
......@@ -6,6 +6,8 @@ use Symfony\Component\Process\Process;
/**
* Shared methods for running processes.
*
* @internal
*/
trait ProcessTrait {
......
......@@ -14,6 +14,8 @@ use Symfony\Component\Process\Process;
/**
* Contains the tome:static command.
*
* @internal
*/
class StaticCommand extends CommandBase {
......
......@@ -12,6 +12,8 @@ use Symfony\Component\Console\Output\OutputInterface;
/**
* Contains the tome:static-export-path command.
*
* @internal
*/
class StaticExportPathCommand extends StaticCommand {
......
......@@ -12,6 +12,8 @@ use Symfony\Component\Process\Process;
/**
* Contains the tome:preview command.
*
* @internal
*/
class StaticPreviewCommand extends CommandBase {
......
......@@ -13,6 +13,8 @@ use Symfony\Component\HttpFoundation\ResponseHeaderBag;
/**
* Contains routes related to Tome Static.
*
* @internal
*/
class StaticDownloadController extends ControllerBase {
......
......@@ -11,6 +11,8 @@ use Symfony\Component\HttpFoundation\Session\Session;
/**
* Allows a user to exit a static preview.
*
* @internal
*/
class StaticPreviewController extends ControllerBase {
......
......@@ -16,6 +16,8 @@ use Symfony\Component\EventDispatcher\Event;
* If your event subscriber adds a path that is already multilingual, you
* should set the "language_processed" metadata to any value, and the
* "langcode" metadata to the language for the path.
*
* @internal
*/
class CollectPathsEvent extends Event {
......
......@@ -6,6 +6,8 @@ use Symfony\Component\EventDispatcher\Event;
/**
* Allows modules that provide placeholder paths to load the real path.
*
* @internal
*/
class PathPlaceholderEvent extends Event {
......
......@@ -12,6 +12,8 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
* Adds entity placeholder paths to the list of paths to export.
*
* @internal
*/
class EntityPathSubscriber implements EventSubscriberInterface {
......
......@@ -9,6 +9,8 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
* Excludes a paths from static generation.
*
* @internal
*/
class ExcludePathSubscriber implements EventSubscriberInterface {
......
......@@ -12,6 +12,8 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
* Adds language negotiation URL prefixes to the list of paths to export.
*
* @internal
*/
class LanguagePathSubscriber implements EventSubscriberInterface {
......
......@@ -8,6 +8,8 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
* Prepares for a new request when using page cache.
*
* @internal
*/
class PageCacheRequestPrepareSubscriber implements EventSubscriberInterface {
......
......@@ -15,6 +15,8 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
* Adds redirect placeholder paths to the list of paths to export.
*
* @internal
*/
class RedirectPathSubscriber implements EventSubscriberInterface {
......
......@@ -10,6 +10,8 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
* Adds route paths to the list of paths to export.
*
* @internal
*/
class RoutePathSubscriber implements EventSubscriberInterface {
......
......@@ -16,6 +16,8 @@ use Symfony\Component\HttpKernel\KernelEvents;
/**
* Routes valid requests to the static build.
*
* @internal
*/
class StaticPreviewRequestSubscriber implements EventSubscriberInterface {
......
......@@ -15,6 +15,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Contains a form for initializing a static build.
*
* @internal
*/
class StaticGeneratorForm extends FormBase {
......
......@@ -11,6 +11,8 @@ use Symfony\Component\HttpFoundation\Session\Session;
/**
* Contains a form for initializing a static preview session.
*
* @internal
*/
class StaticPreviewForm extends FormBase {
......
......@@ -6,6 +6,8 @@ use Drupal\Core\Plugin\Context\LazyContextRepository;
/**
* Decorates the context repository to allow for resetting of contexts.
*
* @internal
*/
class LazyResettableContextRepository extends LazyContextRepository {
......
......@@ -10,6 +10,8 @@ use Drupal\Core\Session\SessionConfigurationInterface;
* Allows CLI page requests to be cached.
*
* @see \Drupal\Core\PageCache\DefaultRequestPolicy
*
* @internal
*/
class CoreRequestPolicy extends ChainRequestPolicy {
......
......@@ -8,6 +8,8 @@ use Drupal\Core\PageCache\ChainRequestPolicy;
* Allows CLI page requests to be cached.
*
* @see \Drupal\dynamic_page_cache\PageCache\RequestPolicy\DefaultRequestPolicy
*
* @internal
*/
class DynamicRequestPolicy extends ChainRequestPolicy {
......
......@@ -10,6 +10,8 @@ use Symfony\Component\HttpFoundation\Request;
*
* The policy denies caching if request method is neither GET nor HEAD (see RFC
* 2616, section 9.1.1 - Safe Methods).
*
* @internal
*/
class UnsafeMethod implements RequestPolicyInterface {
......
......@@ -16,6 +16,8 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
* used by the static generator directly. This is a hotfix for a core problem.
*
* @see \Drupal\tome_static\StaticGeneratorInterface::requestPath
*
* @internal
*/
class RequestPreparer {
......
......@@ -6,6 +6,8 @@ use Drupal\Core\Path\PathMatcher;
/**
* Decorates the path matcher to allow for resetting of static cache.
*
* @internal
*/
class ResettablePathMatcher extends PathMatcher {
......
......@@ -6,6 +6,8 @@ use Drupal\page_cache\StackMiddleware\PageCache;
/**
* Allows the cache ID to be reset between requests.
*
* @internal
*/
class ResettablePageCache extends PageCache {
......
......@@ -11,6 +11,8 @@ use Symfony\Component\HttpFoundation\Response;
/**
* Determines if pages are statically cached.
*
* @internal
*/
class StaticCache extends DatabaseBackend implements StaticCacheInterface {
......
......@@ -20,6 +20,8 @@ use Symfony\Component\HttpKernel\HttpKernelInterface;
/**
* Handles static site generation.
*
* @internal
*/
class StaticGenerator implements StaticGeneratorInterface {
......
......@@ -4,6 +4,8 @@ namespace Drupal\tome_static;
/**
* Trait containing methods useful for different static user interfaces.
*
* @internal
*/
trait StaticUITrait {
......
......@@ -14,6 +14,8 @@ use Symfony\Component\DependencyInjection\Reference;
/**
* Registers services in the container.
*
* @internal
*/
class TomeStaticServiceProvider implements ServiceProviderInterface {
......
......@@ -13,6 +13,8 @@ use Symfony\Component\Console\Output\OutputInterface;
/**
* Contains the tome:clean-files command.
*
* @internal
*/
class CleanFilesCommand extends CommandBase {
......
......@@ -14,6 +14,8 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Contains the tome:export command.
*
* @internal
*/
class ExportCommand extends CommandBase {
......
......@@ -14,6 +14,8 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Contains the tome:export-content command.
*
* @internal
*/
class ExportContentCommand extends ExportCommand {
......
......@@ -13,6 +13,8 @@ use Symfony\Component\Console\Output\OutputInterface;
/**
* Contains the tome:import command.
*
* @internal
*/
class ImportCommand extends CommandBase {
......
......@@ -11,6 +11,8 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Contains the tome:import-complete command.
*
* @internal
*/
class ImportCompleteCommand extends CommandBase {
......
......@@ -13,6 +13,8 @@ use Symfony\Component\Console\Output\OutputInterface;
/**
* Contains the tome:import-content command.
*
* @internal
*/
class ImportContentCommand extends ImportCommand {
......
......@@ -13,6 +13,8 @@ use Symfony\Component\Console\Output\OutputInterface;
/**
* Contains the tome:import-partial command.
*
* @internal
*/
class ImportPartialCommand extends ImportCommand {
......
......@@ -10,6 +10,8 @@ use Drupal\Core\Site\Settings;
* Provides methods for reading and writing the index file.
*
* @todo Move to a service?
*
* @internal
*/
trait ContentIndexerTrait {
......
......@@ -7,6 +7,8 @@ use Symfony\Component\EventDispatcher\Event;
/**
* Wraps a content event for listeners.
*
* @internal
*/
class ContentCrudEvent extends Event {
......
......@@ -13,6 +13,8 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
*
* The book module API isn't used for this because it seems incomplete and is
* really difficult to work with.
*
* @internal
*/
class BookEventSubscriber implements EventSubscriberInterface {
......
......@@ -10,6 +10,8 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
* Keeps the config export directory synced with config CRUD operations.
*
* @internal
*/
class ConfigEventSubscriber implements EventSubscriberInterface {
......
......@@ -11,6 +11,8 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
* Event subscriber that keeps the content hash table up to date.
*
* @internal
*/
class ContentHasherEventSubscriber implements EventSubscriberInterface {
......
......@@ -9,6 +9,8 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
* Keeps the config export directory synced with language config operations.
*
* @internal
*/
class LanguageConfigEventSubscriber implements EventSubscriberInterface {
......
......@@ -14,6 +14,8 @@ use Symfony\Component\Serializer\Serializer;
/**
* Handles exporting of content and file entities.
*
* @internal
*/
class Exporter implements ExporterInterface {
......
......@@ -7,6 +7,8 @@ use Drupal\Core\Site\Settings;
/**
* Contains shared functionality for dealing with files.
*
* @internal
*/
trait FileTrait {
......
......@@ -15,6 +15,8 @@ use Symfony\Component\Serializer\Serializer;
/**
* Handles importing of content and file entities.
*
* @internal
*/
class Importer implements ImporterInterface {
......
......@@ -6,6 +6,8 @@ use Drupal\Core\Config\FileStorage;
/**
* Defines the JSON file storage.
*
* @internal
*/
class JsonFileStorage extends FileStorage {
......
......@@ -6,6 +6,8 @@ use Drupal\Core\Site\Settings;
/**
* Provides a factory for creating json file storage objects.
*
* @internal
*/
class JsonFileStorageFactory {
......
......@@ -6,6 +6,8 @@ use Drupal\serialization\Normalizer\ContentEntityNormalizer as BaseContentEntity
/**
* Normalizes/denormalizes Drupal content entities into an array structure.
*
* @internal
*/
class ContentEntityNormalizer extends BaseContentEntityNormalizer {
......
......@@ -6,6 +6,8 @@ use Drupal\serialization\Normalizer\EntityReferenceFieldItemNormalizer;
/**
* Normalizer for entity reference fields.
*
* @internal
*/
class EntityReferenceItemNormalizer extends EntityReferenceFieldItemNormalizer {
......
......@@ -6,6 +6,8 @@ use Drupal\Core\Entity\RevisionableInterface;
/**
* Normalizer for entity reference revision fields.
*
* @internal
*/
class EntityReferenceRevisionItemNormalizer extends EntityReferenceItemNormalizer {
......
......@@ -7,6 +7,8 @@ use Drupal\serialization\Normalizer\FieldItemNormalizer as BaseFieldItemNormaliz
/**
* Normalizer for fields.
*
* @internal
*/
class FieldItemNormalizer extends BaseFieldItemNormalizer {
......
......@@ -6,6 +6,8 @@ use Drupal\serialization\Normalizer\FieldItemNormalizer as BaseFieldItemNormaliz
/**
* Normalizer for Path fields.
*
* @internal
*/
class PathItemNormalizer extends BaseFieldItemNormalizer {
......
......@@ -6,6 +6,8 @@ use Drupal\pathauto\PathautoState;
/**
* Normalizer for Pathauto.
*
* @internal
*/
class PathautoItemNormalizer extends PathItemNormalizer {
......
......@@ -4,6 +4,8 @@ namespace Drupal\tome_sync\Normalizer;
/**
* Normalizes/denormalizes Drupal user entities into an array structure.
*
* @internal
*/
class UserEntityNormalizer extends ContentEntityNormalizer {
......
......@@ -7,6 +7,8 @@ use Drupal\Core\Entity\TranslatableInterface;
/**
* Provides helpers for the Tome Sync module.
*
* @internal
*/
class TomeSyncHelper {
......
......@@ -10,6 +10,8 @@ use Symfony\Component\DependencyInjection\Reference;
/**
* Registers services in the container.
*
* @internal
*/
class TomeSyncServiceProvider implements ServiceProviderInterface {
......
......@@ -11,6 +11,8 @@ use Drupal\field\Entity\FieldConfig;
/**
* Implements hook_entity_insert().
*
* @internal
*/
function tome_sync_entity_insert(EntityInterface $entity) {
if (_tome_sync_should_export($entity)) {
......@@ -20,6 +22,8 @@ function tome_sync_entity_insert(EntityInterface $entity) {
/**
* Implements hook_entity_update().
*
* @internal
*/
function tome_sync_entity_update(EntityInterface $entity) {
tome_sync_entity_insert($entity);
......@@ -27,6 +31,8 @@ function tome_sync_entity_update(EntityInterface $entity) {
/**
* Implements hook_entity_delete().
*
* @internal
*/
function tome_sync_entity_delete(EntityInterface $entity) {
if (_tome_sync_should_export($entity)) {
......@@ -36,6 +42,8 @@ function tome_sync_entity_delete(EntityInterface $entity) {
/**
* Implements hook_entity_translation_delete().
*
* @internal
*/
function tome_sync_entity_translation_delete(EntityInterface $translation) {
tome_sync_entity_delete($translation);
......@@ -78,6 +86,8 @@ function tome_sync_field_config_delete(FieldConfig $field) {
*
* @return bool
* Whether or not the given entity should be exported.
*
* @internal
*/
function _tome_sync_should_export(EntityInterface $entity) {
return $entity instanceof ContentEntityInterface
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment