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>
|
||||||
<buildpathentry external="true" kind="lib" path="/srv/slt-dev"/>
|
<buildpathentry external="true" kind="lib" path="/srv/slt-dev"/>
|
||||||
<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
|
<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
|
||||||
|
<buildpathentry external="true" kind="lib" path="/srv/http/slt"/>
|
||||||
</buildpath>
|
</buildpath>
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
eclipse.preferences.version=1
|
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;
|
private $joins = null;
|
||||||
public function getAttributes($force = False)
|
public function getJoins($force = False)
|
||||||
{
|
{
|
||||||
if($this->joins === null || $force)
|
if($this->joins === null || $force)
|
||||||
$this->joins = $this->fetchJoins();
|
$this->joins = $this->fetchJoins();
|
||||||
|
@ -15,17 +15,22 @@ class ClubsViewClub extends AbstractClubsViewSingle
|
|||||||
|
|
||||||
$this->prepareDisplay();
|
$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;
|
else
|
||||||
return array('offer'=>$offer, 'mark'=>$mark);
|
{
|
||||||
}, $offers);
|
// $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);
|
parent::display($tpl);
|
||||||
|
@ -12,7 +12,8 @@ class ClubsViewClubs extends HtmlView
|
|||||||
function display($tpl = null)
|
function display($tpl = null)
|
||||||
{
|
{
|
||||||
// $this->offers = ClubsOffer::loadOffers();
|
// $this->offers = ClubsOffer::loadOffers();
|
||||||
$this->clubs = ClubsClub::loadClubs();
|
$factory = new CommonClubsModelFactoryClub();
|
||||||
|
$this->clubs = $factory->loadElements();
|
||||||
|
|
||||||
ToolbarHelper::title('Club-Management - Clubs');
|
ToolbarHelper::title('Club-Management - Clubs');
|
||||||
parent::display($tpl);
|
parent::display($tpl);
|
||||||
|
@ -21,27 +21,27 @@ class ClubsViewTest extends HtmlView
|
|||||||
|
|
||||||
$this->club = $this->clubs[0];
|
$this->club = $this->clubs[0];
|
||||||
|
|
||||||
$c = $factory->loadById(1);
|
// $c = $factory->loadById(1);
|
||||||
$p = $c->getPresident();
|
// $p = $c->getPresident();
|
||||||
$id = $p->getId();
|
// $id = $p->getId();
|
||||||
|
|
||||||
$places = $c->getPlaces();
|
// $places = $c->getPlaces();
|
||||||
// $places[0]->setName("abc");
|
// // $places[0]->setName("abc");
|
||||||
// $places[0]->save();
|
// // $places[0]->save();
|
||||||
|
|
||||||
$pfactory = new CommonClubsModelFactoryPlace();
|
// $pfactory = new CommonClubsModelFactoryPlace();
|
||||||
$np = $pfactory->createNew();
|
// $np = $pfactory->createNew();
|
||||||
$np->setName('MyName');
|
// $np->setName('MyName');
|
||||||
$np->setClub($c);
|
// $np->setClub($c);
|
||||||
// $np->save();
|
// // $np->save();
|
||||||
$np->getId();
|
// $np->getId();
|
||||||
|
|
||||||
$np = $c->getPlaces()[2];
|
// $np = $c->getPlaces()[2];
|
||||||
$np->getName();
|
// $np->getName();
|
||||||
// $np->setName('foo2 with new Name');
|
// // $np->setName('foo2 with new Name');
|
||||||
// $np->save();
|
// // $np->save();
|
||||||
// $np->delete();
|
// // $np->delete();
|
||||||
$this->log = $np;
|
// $this->log = $np;
|
||||||
|
|
||||||
parent::display($tpl);
|
parent::display($tpl);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user