Small changes in the code to make something run again...
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user