EntityTestContainerFactoryPlugin.php

Same filename in other branches
  1. 9 core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/EntityTestContainerFactoryPlugin.php
  2. 11.x core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/EntityTestContainerFactoryPlugin.php

Namespace

Drupal\entity_test\Plugin\Validation\Constraint

File

core/modules/system/tests/modules/entity_test/src/Plugin/Validation/Constraint/EntityTestContainerFactoryPlugin.php

View source
<?php

namespace Drupal\entity_test\Plugin\Validation\Constraint;

use Drupal\Component\Plugin\PluginBase;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\Core\Validation\Attribute\Constraint;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
 * A dummy constraint for testing \Drupal\Core\Validation\ConstraintFactory.
 */
class EntityTestContainerFactoryPlugin extends PluginBase implements ContainerFactoryPluginInterface {
    
    /**
     * {@inheritdoc}
     */
    public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
        return new static($configuration, $plugin_id, $plugin_definition);
    }

}

Classes

Title Deprecated Summary
EntityTestContainerFactoryPlugin A dummy constraint for testing \Drupal\Core\Validation\ConstraintFactory.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.