Updated user view in order to show referenced clubs
This commit is contained in:
@@ -14,9 +14,9 @@ class CommonClubsModelColumnRef extends AbstractCommonClubsModelColumn
|
||||
|
||||
protected $className;
|
||||
|
||||
public function __construct($alias, $className, $column=null)
|
||||
public function __construct($alias, $className, $column, $filter)
|
||||
{
|
||||
parent::__construct($alias, $column);
|
||||
parent::__construct($alias, $filter, $column);
|
||||
|
||||
if(empty($className))
|
||||
throw new Exception('Classname must be non-empty.');
|
||||
|
||||
@@ -8,15 +8,15 @@ class CommonClubsModelFactoryClub extends AbstractCommonClubsModelFactory
|
||||
public function fetchAttributes()
|
||||
{
|
||||
return array(
|
||||
new CommonClubsModelColumnString('name'),
|
||||
new CommonClubsModelColumnString('address'),
|
||||
new CommonClubsModelColumnString('city'),
|
||||
new CommonClubsModelColumnString('homepage'),
|
||||
new CommonClubsModelColumnString('mail'),
|
||||
new CommonClubsModelColumnString('iban'),
|
||||
new CommonClubsModelColumnString('bic'),
|
||||
new CommonClubsModelColumnInt('charitable'),
|
||||
new CommonClubsModelColumnRef('president', 'CommonClubsModelUser')
|
||||
new CommonClubsModelColumnString('name', new CommonClubsControllerMappingString('Clubname')),
|
||||
new CommonClubsModelColumnString('address', new CommonClubsControllerMappingString('Adresse')),
|
||||
new CommonClubsModelColumnString('city', new CommonClubsControllerMappingString('Stadt')),
|
||||
new CommonClubsModelColumnString('homepage', new CommonClubsControllerMappingString('Homepaage', false)),
|
||||
new CommonClubsModelColumnString('mail', new CommonClubsControllerMappingString('E-Mail')),
|
||||
new CommonClubsModelColumnString('iban', new CommonClubsControllerMappingCmd('IBAN')),
|
||||
new CommonClubsModelColumnString('bic', new CommonClubsControllerMappingCmd('BIC')),
|
||||
new CommonClubsModelColumnInt('charitable', new CommonClubsControllerMappingInt('Gemeinnützigkeit')),
|
||||
new CommonClubsModelColumnRef('president', 'CommonClubsModelUser', 'president', new CommonClubsControllerMappingRef('Vorsitzender', new CommonClubsModelFactoryUser()))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ class CommonClubsModelFactoryOfferassoc extends AbstractCommonClubsModelFactory
|
||||
protected function fetchAttributes()
|
||||
{
|
||||
return array(
|
||||
new CommonClubsModelColumnRef('club', 'CommonClubsModelClub', true, 'clubid'),
|
||||
new CommonClubsModelColumnRef('offer', 'CommonClubsModelOffer', true, 'offerid')
|
||||
new CommonClubsModelColumnRef('club', 'CommonClubsModelClub', 'clubid', new CommonClubsControllerMappingRef('Club', new CommonClubsModelFactoryClub())),
|
||||
new CommonClubsModelColumnRef('offer', 'CommonClubsModelOffer', 'offerid', new CommonClubsControllerMappingRef('Angebot', new CommonClubsModelFactoryOffer()))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ class CommonClubsModelFactoryPlace extends AbstractCommonClubsModelFactory
|
||||
public function fetchAttributes()
|
||||
{
|
||||
return array(
|
||||
new CommonClubsModelColumnString('name'),
|
||||
new CommonClubsModelColumnRef('club', 'CommonClubsModelClub', true, 'clubid'),
|
||||
new CommonClubsModelColumnInt('area', false)
|
||||
new CommonClubsModelColumnString('name', new CommonClubsControllerMappingString('Bezeichnung')),
|
||||
new CommonClubsModelColumnRef('club', 'CommonClubsModelClub', 'clubid', new CommonClubsControllerMappingRef('Club', new CommonClubsModelFactoryClub())),
|
||||
new CommonClubsModelColumnInt('area', new CommonClubsControllerMappingInt('Fläche', false))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,14 +8,14 @@ class CommonClubsModelFactoryUserassoc extends AbstractCommonClubsModelFactory
|
||||
protected function fetchAttributes()
|
||||
{
|
||||
return array(
|
||||
new CommonClubsModelColumnRef('user', 'CommonClubsModelUser', true, 'userid'),
|
||||
new CommonClubsModelColumnRef('club', 'CommonClubsModelClub', true, 'clubid'),
|
||||
new CommonClubsModelColumnRef('position', 'CommonClubsModelPosition', true, 'positionid'),
|
||||
new CommonClubsModelColumnInt('admin'),
|
||||
new CommonClubsModelColumnString('address', false),
|
||||
new CommonClubsModelColumnString('mail', false),
|
||||
new CommonClubsModelColumnString('phone', false),
|
||||
new CommonClubsModelColumnString('state')
|
||||
new CommonClubsModelColumnRef('user', 'CommonClubsModelUser', 'userid', new CommonClubsControllerMappingRef('User', new CommonClubsModelFactoryUser())),
|
||||
new CommonClubsModelColumnRef('club', 'CommonClubsModelClub', 'clubid', new CommonClubsControllerMappingRef('Club', new CommonClubsModelFactoryClub())),
|
||||
new CommonClubsModelColumnRef('position', 'CommonClubsModelPosition', 'positionid', new CommonClubsControllerMappingRef('Position', new CommonClubsModelFactoryPosition())),
|
||||
new CommonClubsModelColumnInt('admin', new CommonClubsControllerMappingInt('Admin')),
|
||||
new CommonClubsModelColumnString('address', new CommonClubsControllerMappingString('Adresse', false)),
|
||||
new CommonClubsModelColumnString('mail', new CommonClubsControllerMappingString('E-Mail', false)),
|
||||
new CommonClubsModelColumnString('phone', new CommonClubsControllerMappingString('Telefonnummer', false)),
|
||||
new CommonClubsModelColumnString('state', new CommonClubsControllerMappingString('Status'))
|
||||
// -> `state` enum('regular', 'vacant', 'temporary') NOT NULL DEFAULT 'vacant',
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user