Exemplo n.º 1
0
 public function indexAction()
 {
     $cars = Car::findAll();
     foreach ($cars as $car) {
         echo $car->brand . '<br>';
         foreach ($car->Users as $u) {
             echo $u->name . '<br>';
         }
     }
 }
Exemplo n.º 2
0
<?php

require 'required.inc.php';
$cars = Car::findAll();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>Cars</title>
    <script type="text/javascript" src="jquery-1.2.3.min.js"></script>
    <script type="text/javascript" src="jquery.livequery.min.js"></script>
    <script type="text/javascript" src="jquery.ui-1.0.min.js"></script>
    <script type="text/javascript" src="cars.js"></script>
    <link rel="stylesheet" type="text/css" href="flora.tablesorter.css" />
    <link rel="stylesheet" type="text/css" href="flora.resizable.css" />
    <link rel="stylesheet" type="text/css" href="flora.dialog.css" />
    <link rel="stylesheet" type="text/css" href="style.css" />
    <link rel="stylesheet" type="text/css" href="print.css" media="print" />
  </head>
  <body class="flora">
    <h1>Cars</h1>
    <table id="cars" class="tablesorter">
      <thead>
        <tr>
          <th>Price</th>
          <th>Make</th>
          <th>Model</th>
          <th>Year</th>
          <th>Mileage</th>
          <th>VIN</th>
          <th>Dealer</th>