diff --git a/.buildpath b/.buildpath index 635eec4..2c3078b 100644 --- a/.buildpath +++ b/.buildpath @@ -8,4 +8,5 @@ + diff --git a/.settings/org.eclipse.php.core.prefs b/.settings/org.eclipse.php.core.prefs index d0241b4..16ec813 100644 --- a/.settings/org.eclipse.php.core.prefs +++ b/.settings/org.eclipse.php.core.prefs @@ -1,2 +1,2 @@ eclipse.preferences.version=1 -include_path=1;/srv/slt-dev +include_path=1;/srv/slt-dev\u00051;/srv/http/slt diff --git a/src/admin/common/abstract/model/factory.php b/src/admin/common/abstract/model/factory.php index fc0b52b..a0f2aac 100644 --- a/src/admin/common/abstract/model/factory.php +++ b/src/admin/common/abstract/model/factory.php @@ -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(); diff --git a/src/admin/views/club/view.html.php b/src/admin/views/club/view.html.php index 1d1e477..9b0b323 100644 --- a/src/admin/views/club/view.html.php +++ b/src/admin/views/club/view.html.php @@ -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); diff --git a/src/admin/views/clubs/view.html.php b/src/admin/views/clubs/view.html.php index 09de821..9124741 100644 --- a/src/admin/views/clubs/view.html.php +++ b/src/admin/views/clubs/view.html.php @@ -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); diff --git a/src/admin/views/test/view.html.php b/src/admin/views/test/view.html.php index d6049fa..81e77f1 100644 --- a/src/admin/views/test/view.html.php +++ b/src/admin/views/test/view.html.php @@ -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); }