Skip to content
Snippets Groups Projects
Select Git revision
  • 43f3d38a74e31d5d64ad5ca6d90229b5c7c0c5ae
  • 8.x-1.x default
  • 7.x-1.x
  • 6.x-1.x
  • 4.7.x-1.x
  • 5.x-1.x
  • 5.x-2.x
  • 8.x-1.4
  • 8.x-1.3
  • 8.x-1.2
  • 8.x-1.1
  • 8.x-1.0
  • 8.x-1.0-beta7
  • 8.x-1.0-beta6
  • 8.x-1.0-beta5
  • 8.x-1.0-beta4
  • 8.x-1.0-beta3
  • 8.x-1.0-beta2
  • 8.x-1.0-beta1
  • 7.x-1.3
  • 7.x-1.2
  • 7.x-1.1
  • 7.x-1.0
  • 7.x-1.0-rc1
  • 7.x-1.0-beta2
  • 6.x-1.6
  • 7.x-1.0-beta1
27 results

comment_notify.module

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    TypedDataManager.php 10.19 KiB
    <?php
    
    namespace Drupal\Core\TypedData;
    
    use Drupal\Component\Plugin\Exception\PluginException;
    use Drupal\Core\Cache\CacheBackendInterface;
    use Drupal\Core\DependencyInjection\ClassResolverInterface;
    use Drupal\Core\DependencyInjection\DependencySerializationTrait;
    use Drupal\Core\Extension\ModuleHandlerInterface;
    use Drupal\Core\Plugin\DefaultPluginManager;
    use Drupal\Core\TypedData\Validation\ExecutionContextFactory;
    use Drupal\Core\TypedData\Validation\RecursiveValidator;
    use Drupal\Core\Validation\ConstraintManager;
    use Drupal\Core\Validation\ConstraintValidatorFactory;
    use Drupal\Core\Validation\DrupalTranslator;
    use Symfony\Component\Validator\Validator\ValidatorInterface;
    
    /**
     * Manages data type plugins.
     */
    class TypedDataManager extends DefaultPluginManager implements TypedDataManagerInterface {
      use DependencySerializationTrait;
    
      /**
       * The validator used for validating typed data.
       *
       * @var \Symfony\Component\Validator\Validator\ValidatorInterface
       */
      protected $validator;
    
      /**
       * The validation constraint manager to use for instantiating constraints.
       *
       * @var \Drupal\Core\Validation\ConstraintManager
       */
      protected $constraintManager;
    
      /**
       * An array of typed data property prototypes.
       *
       * @var array
       */
      protected $prototypes = [];
    
      /**
       * The class resolver.
       *
       * @var \Drupal\Core\DependencyInjection\ClassResolverInterface
       */
      protected $classResolver;
    
      /**
       * Constructs a new TypedDataManager.
       *
       * @param \Traversable $namespaces
       *   An object that implements \Traversable which contains the root paths
       *   keyed by the corresponding namespace to look for plugin implementations.
       * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
       *   Cache backend instance to use.
       * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
       *   The module handler.
       * @param \Drupal\Core\DependencyInjection\ClassResolverInterface $class_resolver
       *   The class resolver.
       */
      public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, ClassResolverInterface $class_resolver) {
        $this->alterInfo('data_type_info');
        $this->setCacheBackend($cache_backend, 'typed_data_types_plugins');
        $this->classResolver = $class_resolver;
    
        parent::__construct('Plugin/DataType', $namespaces, $module_handler, NULL, 'Drupal\Core\TypedData\Annotation\DataType');