/** * Display form to create/edit a track. * @param $args array optional, if set the first parameter is the ID of the track to edit */ function editTrack($args = array()) { $this->validate(); $this->setupTemplate(true); import('manager.form.TrackForm'); $trackForm = new TrackForm(!isset($args) || empty($args) ? null : $args[0]); if ($trackForm->isLocaleResubmit()) { $trackForm->readInputData(); } else { $trackForm->initData(); } $trackForm->display(); }