materiels/src/www/admin/entrees/definitives/index.php

22 lines
438 B
PHP
Raw Normal View History

<?php
namespace Garradin;
use Garradin\Plugin\Materiels\Equipment;
use Garradin\Plugin\Materiels\Entry;
require_once __DIR__ . '/../../_inc.php';
$eqmt = new Equipment;
$entry = new Entry;
$entries = $entry->listAll();
foreach ($entries as $key => $value) {
$entries[$key]->equipment = $eqmt->get($value->equipment_id);
}
$tpl->assign(compact('entries'));
$tpl->display(PLUGIN_ROOT . '/templates/entrees/definitives/index.tpl');