}
/**
- * Adds a Kronolith_Resource to this event.
+ * Adds a single Kronolith_Resource to this event.
* No validation or acceptence/denial is done here...it should be done
* when saving the Event.
*
}
/**
+ * Directly set/replace the _resources array. Called from Event::readForm
+ * to bulk load the resources from $_SESSION
+ *
+ * @param $resources
+ * @return unknown_type
+ */
+ public function setResources($resources)
+ {
+ $this->_resources = $resources;
+ }
+
+ /**
* Remove a Kronolith_Resource from this event
*
* @param Kronolith_Resource $resource The resource to remove
$this->setAttendees($_SESSION['kronolith']['attendees']);
}
+ // Resources
+ if (isset($_SESSION['kronolith']['resources']) && is_array($_SESSION['kronolith']['resources'])) {
+ $this->setResources($_SESSION['kronolith']['resources']);
+ }
+
// strptime() is locale dependent, i.e. %p is not always matching
// AM/PM. Set the locale to C to workaround this, but grab the
// locale's D_FMT before that.