Small changes in the code to make something run again...

This commit is contained in:
2019-05-26 16:15:20 +02:00
parent 92481a62ac
commit 5a359ad97a
6 changed files with 36 additions and 29 deletions

View File

@@ -15,17 +15,22 @@ class ClubsViewClub extends AbstractClubsViewSingle
$this->prepareDisplay();
$this->users = ClubsUser::loadUsers();
$userFactory = new CommonClubsModelFactoryUser();
$this->users = $userFactory->loadElements();
if(! $this->isNew)
if($this->isNew)
{
$offers = ClubsOffer::loadOffers();
$currentOffers = $this->object->getOffers();
$this->offers = array_map(function($offer) use ($currentOffers){
$mark = False;
return array('offer'=>$offer, 'mark'=>$mark);
}, $offers);
}
else
{
// $offers = ClubsOffer::loadOffers();
// $currentOffers = $this->object->getOffers();
// $this->offers = array_map(function($offer) use ($currentOffers){
// $mark = False;
// return array('offer'=>$offer, 'mark'=>$mark);
// }, $offers);
}
parent::display($tpl);