Skip to content
Snippets Groups Projects
Commit 0656a487 authored by Matthieu Guffroy's avatar Matthieu Guffroy
Browse files

fix errors

parent 9efec072
No related branches found
No related tags found
No related merge requests found
......@@ -43,4 +43,8 @@ class Field {
return $this->value;
}
public function getLabel() {
return $name;
}
}
......@@ -20,4 +20,12 @@ class ListView
return $this->objArray;
}
public function getLabels() {
if(count($this->objArray) > 0 ){
return $this->objArray[0];
} else {
throw new Exception("Liste vide");
}
}
}
\ No newline at end of file
......@@ -5,8 +5,8 @@
</div>
<table class="table">
<thead>
<?php foreach($list->getLabels() as $key): ?>
<th><?php echo ucfirst($key); ?></th>
<?php foreach($list->getLabels() as $field): ?>
<th><?php echo $field->getLabel(); ?></th>
<?php endforeach; ?>
<th></th>
</thead>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment