Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function render(ResultRow $values) {
- //
- // Complex query omitted
- //
- $results = $query->execute()->fetchAll();
- $html = '';
- foreach ($results as $item) {
- $customerLink = Drupal::service('path.alias_manager')->getAliasByPath('/node/' . $item->customer_nid);
- $scLink = Drupal::service('path.alias_manager')->getAliasByPath('/node/' . $item->sc_nid);
- $render = array(
- '#theme' => 'my_field_shipment_customers',
- '#customer_link' => $customerLink,
- '#customer' => $item->customer,
- '#sc_link' => $scLink,
- '#sc_id' => $item->sc_id,
- '#containers' => $item->containers,
- );
- $html .= Drupal::service('renderer')->render($render);
- }
- $render = array(
- '#theme' => 'my_field_shipment_customers_wrapper',
- '#data' => t($html),
- );
- $output = Drupal::service('renderer')->render($render);
- return $output;
- }
- $values->{'my_field_outstanding_balance'} = $balance;
Add Comment
Please, Sign In to add comment