You are here

interface SequentialNumberPatternInterface in Commerce Core 8.2

Defines the interface for number pattern which support sequences.

Hierarchy

Expanded class hierarchy of SequentialNumberPatternInterface

All classes that implement SequentialNumberPatternInterface

1 file declares its use of SequentialNumberPatternInterface
NumberPatternAccessControlHandler.php in modules/number_pattern/src/NumberPatternAccessControlHandler.php

File

modules/number_pattern/src/Plugin/Commerce/NumberPattern/SequentialNumberPatternInterface.php, line 10

Namespace

Drupal\commerce_number_pattern\Plugin\Commerce\NumberPattern
View source
interface SequentialNumberPatternInterface extends NumberPatternInterface {

  /**
   * Gets the initial sequence for the given entity.
   *
   * @param \Drupal\Core\Entity\ContentEntityInterface $entity
   *   The entity.
   *
   * @return \Drupal\commerce_number_pattern\Sequence
   *   The initial sequence.
   */
  public function getInitialSequence(ContentEntityInterface $entity);

  /**
   * Gets the current sequence for the given entity.
   *
   * @param \Drupal\Core\Entity\ContentEntityInterface $entity
   *   The entity.
   *
   * @return \Drupal\commerce_number_pattern\Sequence|null
   *   The current sequence, or NULL if none found.
   */
  public function getCurrentSequence(ContentEntityInterface $entity);

  /**
   * Gets the next sequence for the given entity.
   *
   * @param \Drupal\Core\Entity\ContentEntityInterface $entity
   *   The entity.
   *
   * @return \Drupal\commerce_number_pattern\Sequence
   *   The next sequence.
   */
  public function getNextSequence(ContentEntityInterface $entity);

  /**
   * Resets the sequence.
   */
  public function resetSequence();

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 11
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 12
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 12
NumberPatternInterface::generate public function Generates a number for the given content entity. 1
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2
SequentialNumberPatternInterface::getCurrentSequence public function Gets the current sequence for the given entity. 1
SequentialNumberPatternInterface::getInitialSequence public function Gets the initial sequence for the given entity. 1
SequentialNumberPatternInterface::getNextSequence public function Gets the next sequence for the given entity. 1
SequentialNumberPatternInterface::resetSequence public function Resets the sequence. 1