Hi,
I'm trying to add a method ('endTime') that doesn't exist in the
model, it's essentially a convenience method to set just the time part
of time_ts which is a timestamp. It shows up properly in the list,
however, the widget is never populated with a value in the edit page.
As far as I can tell, getEndTime never even gets called when loading
the edit page, because when I put a 'die()' in there, execution never
stops (although it does on the list page)
Thx!
Game.class.php
public function getEndTime($format = 'H:i') {
return date($format, strtotime($this->getEndTs()));
}
public function setEndTime($time) {
$this->setEndTs($this->getDate().' '.$time);
}
generator:
class: sfDoctrineGenerator
param:
model_class: Game
theme: jroller
non_verbose_templates: true
with_show: false
singular: ~
plural: ~
route_prefix: game
with_doctrine_route: 1
config:
actions: ~
fields:
league_id: { label: League }
field_id: { label: Field }
home_team_id: { label: Home Team }
away_team_id: { label: Away Team }
game_status_id: { label: Status }
start_ts:
label: Start
help: The day and time the this game starts
end_ts:
label: End
help: The date and time that this game ends
end_time:
label: End
help: The time that this game ends
list:
display: [field, =game_status, home_team_id, away_team_id,
start_ts, end_ts, end_time, score]
filter: ~
form:
display: [field_id, game_status_id, home_team_id,
away_team_id, start_ts, end_ts, end_time]
edit: ~
new: ~
symfony 1.2 / doctrine
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---