/** * Start logging. * * @param array|object $settings * * @return int */ public function start($settings) { $history = new Import_HistoryRecord(); $history->userId = craft()->userSession->getUser()->id; $history->type = $settings['type']; $history->file = basename($settings['file']); $history->rows = $settings['rows']; $history->behavior = $settings['behavior']; $history->status = ImportModel::StatusStarted; $history->save(false); return $history->id; }