Small changes in the code to make something run again...
This commit is contained in:
parent
92481a62ac
commit
5a359ad97a
@ -8,4 +8,5 @@
|
||||
</buildpathentry>
|
||||
<buildpathentry external="true" kind="lib" path="/srv/slt-dev"/>
|
||||
<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
|
||||
<buildpathentry external="true" kind="lib" path="/srv/http/slt"/>
|
||||
</buildpath>
|
||||
|
@ -1,2 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
include_path=1;/srv/slt-dev
|
||||
include_path=1;/srv/slt-dev\u00051;/srv/http/slt
|
||||
|
@ -77,7 +77,7 @@ abstract class AbstractCommonClubsModelFactory
|
||||
}
|
||||
|
||||
private $joins = null;
|
||||
public function getAttributes($force = False)
|
||||
public function getJoins($force = False)
|
||||
{
|
||||
if($this->joins === null || $force)
|
||||
$this->joins = $this->fetchJoins();
|
||||
|
@ -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);
|
||||
|
@ -12,7 +12,8 @@ class ClubsViewClubs extends HtmlView
|
||||
function display($tpl = null)
|
||||
{
|
||||
// $this->offers = ClubsOffer::loadOffers();
|
||||
$this->clubs = ClubsClub::loadClubs();
|
||||
$factory = new CommonClubsModelFactoryClub();
|
||||
$this->clubs = $factory->loadElements();
|
||||
|
||||
ToolbarHelper::title('Club-Management - Clubs');
|
||||
parent::display($tpl);
|
||||
|
@ -21,27 +21,27 @@ class ClubsViewTest extends HtmlView
|
||||
|
||||
$this->club = $this->clubs[0];
|
||||
|
||||
$c = $factory->loadById(1);
|
||||
$p = $c->getPresident();
|
||||
$id = $p->getId();
|
||||
// $c = $factory->loadById(1);
|
||||
// $p = $c->getPresident();
|
||||
// $id = $p->getId();
|
||||
|
||||
$places = $c->getPlaces();
|
||||
// $places[0]->setName("abc");
|
||||
// $places[0]->save();
|
||||
// $places = $c->getPlaces();
|
||||
// // $places[0]->setName("abc");
|
||||
// // $places[0]->save();
|
||||
|
||||
$pfactory = new CommonClubsModelFactoryPlace();
|
||||
$np = $pfactory->createNew();
|
||||
$np->setName('MyName');
|
||||
$np->setClub($c);
|
||||
// $np->save();
|
||||
$np->getId();
|
||||
// $pfactory = new CommonClubsModelFactoryPlace();
|
||||
// $np = $pfactory->createNew();
|
||||
// $np->setName('MyName');
|
||||
// $np->setClub($c);
|
||||
// // $np->save();
|
||||
// $np->getId();
|
||||
|
||||
$np = $c->getPlaces()[2];
|
||||
$np->getName();
|
||||
// $np->setName('foo2 with new Name');
|
||||
// $np->save();
|
||||
// $np->delete();
|
||||
$this->log = $np;
|
||||
// $np = $c->getPlaces()[2];
|
||||
// $np->getName();
|
||||
// // $np->setName('foo2 with new Name');
|
||||
// // $np->save();
|
||||
// // $np->delete();
|
||||
// $this->log = $np;
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user