Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html1/web/core/modules/system/tests/modules/plugin_test/src/Plugin/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html1/web/core/modules/system/tests/modules/plugin_test/src/Plugin/TestPluginManager.php

<?php

namespace Drupal\plugin_test\Plugin;

use Drupal\Component\Plugin\PluginManagerBase;
use Drupal\Component\Plugin\Discovery\StaticDiscovery;
use Drupal\Component\Plugin\Factory\DefaultFactory;

/**
 * Defines a plugin manager used by Plugin API unit tests.
 */
class TestPluginManager extends PluginManagerBase {

  public function __construct() {

    // Create the object that can be used to return definitions for all the
    // plugins available for this type. Most real plugin managers use a richer
    // discovery implementation, but StaticDiscovery lets us add some simple
    // mock plugins for unit testing.
    $this->discovery = new StaticDiscovery();

    // A simple plugin: a mock user login block.
    $this->discovery->setDefinition('user_login', [
      'label' => 'User login',
      'class' => 'Drupal\plugin_test\Plugin\plugin_test\mock_block\MockUserLoginBlock',
    ]);

    // In addition to finding all of the plugins available for a type, a plugin
    // type must also be able to create instances of that plugin. For example, a
    // specific instance of a "User login" block, configured with a custom
    // title. To handle plugin instantiation, plugin managers can use one of the
    // factory classes included with the plugin system, or create their own.
    // DefaultFactory is a simple, general purpose factory suitable for
    // many kinds of plugin types. Factories need access to the plugin
    // definitions (e.g., since that's where the plugin's class is specified),
    // so we provide it the discovery object.
    $this->factory = new DefaultFactory($this->discovery);
  }

}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net