public function Donation::buildPaneSummary in Commerce Donate 8
Builds a summary of the pane values.
Important: The review pane shows summaries for both visible and non-visible panes. To skip showing a summary for a non-visible pane, check isVisible() and return an empty array.
Return value
array A render array containing the summary of the pane values.
Overrides CheckoutPaneBase::buildPaneSummary
File
- src/
Plugin/ Commerce/ CheckoutPane/ Donation.php, line 42
Class
- Donation
- Provides the donation pane.
Namespace
Drupal\commerce_donate\Plugin\Commerce\CheckoutPaneCode
public function buildPaneSummary() {
$summary = [];
if ($this
->isVisible()) {
$order_item = $this
->getOrderItem();
// Expand this to provide the appropriate output at checkout review.
$summary = [
'#plain_text' => $order_item
->label(),
];
}
return $summary;
}