base_id = (int) $sx_task_settings->base_id; parent::load_settings($sx_task_settings); return $this; } protected $total_records = 0; protected function retrieve_content(appbox $appbox) { if ( ! $this->base_id) { $this->current_state = self::STATE_FINISHED; return; } $collection = collection::get_from_base_id($this->base_id); $this->total_records = $collection->get_record_amount(); $collection->empty_collection(200); $this->records_done +=$this->total_records; $this->setProgress($this->records_done, $this->total_records); if ($this->total_records == 0) { $this->current_state = self::STATE_FINISHED; $this->log('Job finished'); } return array(); } protected function process_one_content(appbox $appbox, Array $row) { return $this; } protected function post_process_one_content(appbox $appbox, Array $row) { return $this; } }