class CommercePaymentMethodType in Commerce Core 8.2
Defines the payment method type plugin annotation object.
Plugin namespace: Plugin\Commerce\PaymentMethodType.
Hierarchy
- class \Drupal\Component\Annotation\Plugin implements AnnotationInterface
- class \Drupal\commerce_payment\Annotation\CommercePaymentMethodType
Expanded class hierarchy of CommercePaymentMethodType
See also
2 classes are annotated with CommercePaymentMethodType
- CreditCard in modules/
payment/ src/ Plugin/ Commerce/ PaymentMethodType/ CreditCard.php - Provides the credit card payment method type.
- PayPal in modules/
payment/ src/ Plugin/ Commerce/ PaymentMethodType/ PayPal.php - Provides the PayPal payment method type.
File
- modules/
payment/ src/ Annotation/ CommercePaymentMethodType.php, line 16
Namespace
Drupal\commerce_payment\AnnotationView source
class CommercePaymentMethodType extends Plugin {
/**
* The plugin ID.
*
* @var string
*/
public $id;
/**
* The payment method type label.
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $label;
/**
* The payment method type create label.
*
* Defaults to the main label.
*
* @var \Drupal\Core\Annotation\Translation
*
* @ingroup plugin_translatable
*/
public $create_label;
/**
* Constructs a new CommercePaymentMethodType object.
*
* @param array $values
* The annotation values.
*/
public function __construct(array $values) {
if (empty($values['create_label'])) {
$values['create_label'] = $values['label'];
}
parent::__construct($values);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CommercePaymentMethodType:: |
public | property | The payment method type create label. | |
CommercePaymentMethodType:: |
public | property | The plugin ID. | |
CommercePaymentMethodType:: |
public | property | The payment method type label. | |
CommercePaymentMethodType:: |
public | function |
Constructs a new CommercePaymentMethodType object. Overrides Plugin:: |
|
Plugin:: |
protected | property | The plugin definition read from the class annotation. | 1 |
Plugin:: |
public | function |
Gets the value of an annotation. Overrides AnnotationInterface:: |
5 |
Plugin:: |
public | function |
Gets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the unique ID for this annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
protected | function | Parses an annotation into its definition. | |
Plugin:: |
public | function |
Sets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Sets the name of the provider of the annotated class. Overrides AnnotationInterface:: |