Output a "finished" notice and the results of what was done

@return $this
483542
protected function outputResults()
    {
        $this->output();
        $this->output('Finished:');
        foreach ($this->results as $metric => $count) {
            $this->output('+ ' . $metric . ': ' . $count);
        }
        return $this;
    }
415980
public function onResultDone()
    {
        $this->rsState = self::RS_STATE_HEADER;
        $this->onResponse->executeOne($this, true);
        $this->checkFree();
        $this->resultRows = [];
        $this->resultFields = [];
    }
1243583
public function isSuccessful()
    {
        return $this->data->getStatus() === InvoiceInterface::STATUS_CONFIRMED || $this->data->getStatus() === InvoiceInterface::STATUS_COMPLETE;
    }
642632
public function doConfirm()
    {
        if ($this->isConfirmable()) {
            $this->status = self::STATUS_CONFIRMED;

            $this->save();
        }

        return $this;
    }
662067
public function results($total, $created, $updated, $deleted, $errors) {
        if ($this->outputmode == self::NO_OUTPUT) {
            return;
        }

        $message = array(
            get_string('coursestotal', 'tool_uploadcourse', $total),
            get_string('coursescreated', 'tool_uploadcourse', $created),
            get_string('coursesupdated', 'tool_uploadcourse', $updated),
            get_string('coursesdeleted', 'tool_uploadcourse', $deleted),
            get_string('courseserrors', 'tool_uploadcourse', $errors)
        );

        if ($this->outputmode == self::OUTPUT_PLAIN) {
            foreach ($message as $msg) {
                $this->buffer->output($msg);
            }
        } else if ($this->outputmode == self::OUTPUT_HTML) {
            $buffer = new progress_trace_buffer(new html_list_progress_trace());
            foreach ($message as $msg) {
                $buffer->output($msg);
            }
            $buffer->finished();
        }
    }
625186
protected function showResultMessage()
	{
		$msg = $this->_context->get(self::PARAM_MSG);

		if ($msg == self::ACTION_NEW_CONFIRM)
		{
			$message = $this->_lang->Value("MSG_NEW_SUCCESS");
		}
		else if ($msg == self::ACTION_EDIT_CONFIRM)
		{
			$message = $this->_lang->Value("MSG_EDIT_SUCCESS");
		}
		else if ($msg == self::ACTION_DELETE_CONFIRM)
		{
			$message = $this->_lang->Value("MSG_DELETE_SUCCESS");
		}
		else
		{
			$message = $this->_lang->Value("MSG_NOCHANGE");
		}

		$container = new XmlnukeUIAlert($this->_context, UIAlert::BoxInfo);
		$container->setAutoHide(8000);
		$container->addXmlnukeObject(new XmlnukeText($message, true, true, false));

		return $container;
	}
1079974
protected function _finish()
    {
        global $classLoader; // composer's class loader instance
        snapshot();
        Plugin::dropCache();
        // trick: makes plugin visible to AcoManager
        $classLoader->addPsr4($this->_plugin['name'] . "\\", normalizePath(ROOT . "/plugins/{$this->_plugin['name']}/src"), true);
        AcoManager::buildAcos($this->_plugin['name']);
        $this->_reset();
    }
849548
def _toc_fetch_finished(self):
        """"""
        self.cf.remove_port_callback(self.port, self._new_packet_cb)
        logger.debug('[%d]: Done!', self.port)
        self.finished_callback()
1262169
public function finish($results)
    {
        $process = new Process($this->generateConsoleCommand($results, true));

        $process->run(function ($type, $output)
        {
            $this->command->line($output);
        });

        return ! (bool) $process->getExitCode();
    }
893545
public function finish()
    {
        // Re-sync before shutting down.
        foreach ($this->drivers as $acl) {
            $acl->sync();
        }

        $this->drivers = [];

        return $this;
    }
1059478
public function onDeleted()
    {
        // Get the directory of an output
        if (($sources = (array) $this->outputs)      // Convert sources to an array
            && count($sources)                         // If there are sources
            && ($first = array_pop($sources))          // Get the last source
            && preg_match('#^/(?!/)#', $first)         // Make sure it's a local path
            && ($dir = public_path().dirname($first))  // Get the path of the filename
            && is_dir($dir)) {                         // Make sure it's a directory
            File::deleteDir($dir);
        }
    }
650659
public function process_stage_finished($queued=false) {
        global $OUTPUT;
        $returnurl = $this->caller->get_return_url();
        $continueurl = $this->instance->get_interactive_continue_url();
        $extras = $this->instance->get_extra_finish_options();

        $key = 'exportcomplete';
        if ($queued || $this->forcequeue) {
            $key = 'exportqueued';
            if ($this->forcequeue) {
                $key = 'exportqueuedforced';
            }
        }
        $this->print_header(get_string($key, 'portfolio'), false);
        self::print_finish_info($returnurl, $continueurl, $extras);
        echo $OUTPUT->footer();
        return false;
    }
857068
public function done()
    {
        if ($this->is_done) {
            throw new RuntimeException('This batch insert is already done');
        }

        $this->flush();
        $this->is_done = true;

        return $this->total;
    }
1031128
public function finish()
    {
        if ( $this->parserState != self::PARSE_STATE_POST_LAST )
        {
            // this should never happen
            // let's give the last parser a chance to clean up after himself
            if ( $this->currentPartParser !== null )
            {
                $part = $this->currentPartParser->finish();
                $this->partDone( $part );
                $this->currentPartParser = null;
            }
        }
        $multipart = $this->finishMultipart();
        ezcMailPartParser::parsePartHeaders( $this->headers, $multipart );
        $multipart->boundary = $this->boundary;
        return $multipart;
    }
909582
public function is_finished() {

        if ($this->finished === null) {
            $endtime = $this->get_end();
            if ($endtime === 0 || $this->now < $endtime) {
                // It is not yet finished or no idea when it finishes.
                $this->finished = false;
            } else {
                $this->finished = true;
            }
        }

        return $this->finished;
    }
1089409
public function doBuild()
    {
        $output = parent::build();
        if ($this->form && $this->form->status['submitted'] && !$this->props['isValid']) {
            // did not validate -> add hidden field
            $noticeName = $this->attribs['name'].'_notice';
            $this->debug->warn('buildControl', $this->form->buildControl);
            $output .= $this->form->buildControl->build(array(
                'type' => 'hidden',
                'name' => $noticeName,
                'value' => $this->val(),
            ));
        }
        return $output;
    }
694645
protected function starting_output() {
        global $CFG;

        if (!during_initial_install()) {
            $this->blocks->load_blocks();
            if (empty($this->_block_actions_done)) {
                $this->_block_actions_done = true;
                if ($this->blocks->process_url_actions($this)) {
                    redirect($this->url->out(false));
                }
            }
            $this->blocks->create_all_block_instances();
        }

        // If maintenance mode is on, change the page header.
        if (!empty($CFG->maintenance_enabled)) {
            $this->set_button('<a href="' . $CFG->wwwroot . '/' . $CFG->admin .
                    '/settings.php?section=maintenancemode">' . get_string('maintenancemode', 'admin') .
                    '</a> ' . $this->button);

            $title = $this->title;
            if ($title) {
                $title .= ' - ';
            }
            $this->set_title($title . get_string('maintenancemode', 'admin'));
        }

        $this->initialise_standard_body_classes();
    }