function commerce_payment_commerce_payment_method_view in Commerce Core 8.2
Implements hook_ENTITY_TYPE_view().
File
- modules/
payment/ commerce_payment.module, line 94 - Provides payment functionality.
Code
function commerce_payment_commerce_payment_method_view(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode) {
if ($entity
->bundle() == 'credit_card') {
$build['#attached']['library'][] = 'commerce_payment/payment_method_icons';
}
}