devel_wizard-2.x-dev/src/Spell/SpellInterface.php

src/Spell/SpellInterface.php
<?php

declare(strict_types=1);

namespace Drupal\devel_wizard\Spell;

use Drupal\Component\Plugin\ConfigurableInterface;
use Drupal\Component\Plugin\PluginInspectionInterface;
use Symfony\Component\Validator\ConstraintViolationListInterface;

/**
 * @todo Method ::checkRequirements().
 * @todo Method ::validate().
 *
 * @todo Method ::collectRequiredPackages(): array;
 * @todo Method ::collectRequiredModules(): array;
 * @todo Method ::collectRequiredThemes(): array;
 *
 * @method \Drupal\devel_wizard\Spell\SpellDefinition getPluginDefinition()
 */
interface SpellInterface extends PluginInspectionInterface, ConfigurableInterface {

  /**
   * Validates the user input.
   *
   * @param array $configuration
   *   User input with default values.
   */
  public function validate(array $configuration): ConstraintViolationListInterface;

  public function prepare(): static;

  /**
   * @return array<string, string>
   *   Key: Package name. Example: "drupal/foo".
   *   Value: Version constraint. Example: "^1.0" or empty string.
   *
   * @todo Handle conflicting version constraints for the same package.
   */
  public function getRequiredPackagesProd(): array;

  /**
   * @return array<string, bool>
   */
  public function getRequiredPackagesDev(): array;

  /**
   * @return array<string, bool>
   */
  public function getRequiredModules(): array;

  /**
   * @param array|\ArrayObject $context
   *   Batch process context.
   *
   * @see \DrushBatchContext
   */
  public function abracadabra(array|\ArrayObject &$context): static;

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc