class InvoiceNumber in Commerce Invoice 7.2
Hierarchy
- class \Drupal\commerce_invoice\InvoiceNumber\InvoiceNumber
Expanded class hierarchy of InvoiceNumber
3 files declare their use of InvoiceNumber
- commerce_invoice.module in ./
commerce_invoice.module - The Commerce Invoice module.
- commerce_invoice.theme.inc in ./
commerce_invoice.theme.inc - Theme functions for the Commerce Invoice module.
- Invoice.php in src/
Entity/ Invoice.php - Invoice entity.
File
- src/
InvoiceNumber/ InvoiceNumber.php, line 9 - Invoice Number
Namespace
Drupal\commerce_invoice\InvoiceNumberView source
class InvoiceNumber {
const SEQUENCE_TOKEN = '{SEQUENCE}';
protected $sequence;
protected $key;
protected $patternName;
/**
* Constructor.
*
* @param int $sequence
* @param string $key
* @param string $patternName
*/
public function __construct($sequence, $key, $patternName) {
$this->sequence = $sequence;
$this->key = $key;
$this->patternName = $patternName;
$this->pattern = commerce_invoice_number_pattern_load($patternName);
}
/**
* @return int
*/
public function getSequence() {
return $this->sequence;
}
/**
* @return string
*/
public function getKey() {
return $this->key;
}
/**
* @return string
*/
public function getPatternName() {
return $this->patternName;
}
/**
* Magic method to convert the invoice number to a string.
*
* @see theme_commerce_invoice_number()
*
* @return string
*/
public function __toString() {
return theme('commerce_invoice_number', [
'invoice_number' => $this,
'sanitize' => FALSE,
]);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
InvoiceNumber:: |
protected | property | ||
InvoiceNumber:: |
protected | property | ||
InvoiceNumber:: |
protected | property | ||
InvoiceNumber:: |
public | function | ||
InvoiceNumber:: |
public | function | ||
InvoiceNumber:: |
public | function | ||
InvoiceNumber:: |
constant | |||
InvoiceNumber:: |
public | function | Constructor. | |
InvoiceNumber:: |
public | function | Magic method to convert the invoice number to a string. |