You are here

public function PaymentStatusCreated::getValue in Payment 8.2

Gets the data value.

Return value

mixed The data value.

Overrides PrimitiveBase::getValue

File

src/Plugin/DataType/PaymentStatusCreated.php, line 33

Class

PaymentStatusCreated
Provides a payment status created data type.

Namespace

Drupal\payment\Plugin\DataType

Code

public function getValue() {

  /** @var \Drupal\plugin\Plugin\Field\FieldType\PluginCollectionItemInterface $parent */
  $parent = $this
    ->getParent();
  $plugin_instance = $parent
    ->getContainedPluginInstance();
  if ($plugin_instance instanceof PaymentStatusInterface) {
    return $plugin_instance
      ->getCreated();
  }
  return NULL;
}