ok to display entries and equipments in templates
This commit is contained in:
parent
c74ba5ed85
commit
c3eb06ce0d
6 changed files with 50 additions and 2 deletions
|
|
@ -2,6 +2,20 @@
|
|||
|
||||
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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue