<table>
  <thead>
    <tr>
      <?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
        <th><?= lang("{$viewDatas['class_path']}.label.{$field}") ?></th>
      <?php endforeach ?>
    </tr>
  </thead>
  <tbody>
    <?php $cnt = 0 ?>
    <?php foreach ($viewDatas['entities'] as $entity): ?>
      <?php $viewDatas['entity'] = $entity; ?>
      <tr>
        <?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
          <td><?= $viewDatas['service']->getHelper()->getFieldView($field, $entity->$field, $viewDatas) ?></td>
        <?php endforeach ?>
      </tr>
      <?php $cnt++ ?>
    <?php endforeach ?>
  </tbody>
</table>