clean and simplify tree of the plugin

This commit is contained in:
JBthePenguin 2021-06-05 18:48:45 +02:00
parent 35c88400b0
commit 12a11611c6
18 changed files with 31 additions and 77 deletions

View file

@ -0,0 +1,21 @@
<?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/index.tpl');