mortgage-calculator.html.twig in Real Estate Mortgage Calculator 8
Default implementation of a mortgage calculator result template.
Available variables:
- rows: A rows' array containing a calculation result per month/year
- desired_display: can contain one of values: 'monthly' or 'yearly'
- row.number_of_payments: number of payments
- row.payment: annual payment
2 theme calls to mortgage-calculator.html.twig
- MortgageCalculatorBlockResults::build in src/
Plugin/ Block/ MortgageCalculatorBlockResults.php - Builds and returns the renderable array for this block plugin.
- MortgageCalculatorController::mortgageCalculatorPage in src/
Controller/ MortgageCalculatorController.php - Prints a page listing a glossary of Drupal terminology.
File
templates/mortgage-calculator.html.twigView source
- {#
- /**
- * @file
- * Default implementation of a mortgage calculator result template.
- *
- * Available variables:
- * - rows: A rows' array containing a calculation result per month/year
- * - desired_display: can contain one of values: 'monthly' or 'yearly'
- * - row.number_of_payments: number of payments
- * - row.payment: annual payment
- *
- */
- #}
- {{ mortgage_calculator_form }}
- <table class="mortgage-calculator">
- <thead>
- <tr>
- <th>{{ desired_display == 'monthly'?'Month':'Year'|t }}</th>
- <th>{{ 'Beginning Balance'|t }}</th>
- <th>{{ 'Interest'|t }}</th>
- <th>{{ 'Annual Payment'|t }}</th>
- <th>{{ 'Ending Balance'|t }}</th>
- </tr>
- </thead>
- <tbody>
- {% for row in rows %}
- <tr>
- {% for column in row %}
- <td>
- {{ column }}
- </td>
- {% endfor %}
- </tr>
- {% endfor %}
- </tbody>
- </table>