Exemplo n.º 1
0
function loadCarInsuranceData(car $car)
{
    $response->model = $car->getModel();
    $response->color = $car->getColor();
    $response->year = $car->getYear();
    $response->license = $car->getLicense();
    $response->imageSource = $car->getInsurance()->getOutputLocation();
    return $response;
}
Exemplo n.º 2
0
function createCarForm(car $car, $title)
{
    print '<fieldset >
				<legend> <h3>V&eacutehicule ' . $title . '</h3> </legend>
				<div style="display:block" >';
    print createDemandTextField(car::MODEL_TAG, $car->getModel(), '', $car->getModelParamName(), '32', $car->getModelParamName(), $car->getModelErrorMessage());
    print createDemandTextField(car::COLOR_TAG, $car->getColor(), '', $car->getColorParamName(), '16', $car->getColorParamName(), $car->getColorErrorMessage());
    print createDemandTextField(car::YEAR_TAG, $car->getYear(), '', $car->getYearParamName(), '4', $car->getYearParamName(), $car->getYearErrorMessage());
    print createDemandTextField(car::LICENSE_TAG, $car->getLicense(), '', $car->getLicenseParamName(), '128', $car->getLicenseParamName(), $car->getLicenseErrorMessage());
    print createCheckBoxField($car->getElectricParamName(), $car->getIsElectric(), car::ELECTRIC_TAG);
    print createDemandFileField(car::INSURANCE_TAG, '(nom de fichier alphanum&eacuterique [a-z][0-9] sans espace)', '', 'file', $car->getInsuranceParamName(), '', $car->getInsuranceParamName(), $car->getInsuranceErrorMessage(), $car->getInsurance());
    print '	</div>			
		</fieldset>';
}