Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TestSiteExcluder.php

class TestSiteExcluder

Excludes 'sites/simpletest' from stage operations.

@internal This is an internal part of Package Manager and may be changed or removed at any time without warning. External code should not interact with this class.

Hierarchy

  • class \Drupal\package_manager\PathExcluder\TestSiteExcluder implements \Symfony\Component\EventDispatcher\EventSubscriberInterface

Expanded class hierarchy of TestSiteExcluder

File

core/modules/package_manager/src/PathExcluder/TestSiteExcluder.php, line 18

Namespace

Drupal\package_manager\PathExcluder
View source
final class TestSiteExcluder implements EventSubscriberInterface {
    
    /**
     * {@inheritdoc}
     */
    public static function getSubscribedEvents() : array {
        return [
            CollectPathsToExcludeEvent::class => 'excludeTestSites',
        ];
    }
    
    /**
     * Excludes sites/simpletest from stage operations.
     *
     * @param \Drupal\package_manager\Event\CollectPathsToExcludeEvent $event
     *   The event object.
     */
    public function excludeTestSites(CollectPathsToExcludeEvent $event) : void {
        // Always exclude automated test directories. If they exist, they will be in
        // the web root.
        $event->addPathsRelativeToWebRoot([
            'sites/simpletest',
        ]);
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
TestSiteExcluder::excludeTestSites public function Excludes sites/simpletest from stage operations.
TestSiteExcluder::getSubscribedEvents public static function Returns an array of event names this subscriber wants to listen to. Overrides EventSubscriberInterface::getSubscribedEvents

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal