public function SequentialNumberPatternBase::getInitialSequence in Commerce Core 8.2
Gets the initial sequence for the given entity.
Parameters
\Drupal\Core\Entity\ContentEntityInterface $entity: The entity.
Return value
\Drupal\commerce_number_pattern\Sequence The initial sequence.
Overrides SequentialNumberPatternInterface::getInitialSequence
1 call to SequentialNumberPatternBase::getInitialSequence()
- SequentialNumberPatternBase::getNextSequence in modules/
number_pattern/ src/ Plugin/ Commerce/ NumberPattern/ SequentialNumberPatternBase.php - Gets the next sequence for the given entity.
File
- modules/
number_pattern/ src/ Plugin/ Commerce/ NumberPattern/ SequentialNumberPatternBase.php, line 199
Class
- SequentialNumberPatternBase
- Provides a base class for number pattern plugins which support sequences.
Namespace
Drupal\commerce_number_pattern\Plugin\Commerce\NumberPatternCode
public function getInitialSequence(ContentEntityInterface $entity) {
return new Sequence([
'number' => $this->configuration['initial_number'],
'generated' => $this->time
->getRequestTime(),
'store_id' => $this
->getStoreId($entity),
]);
}