Finishes module action
@param mixed $result
6631
protected function finishActionModule($result)
    {
        if ($result === true) {
            $this->redirect('', $this->text('Module has been updated'), 'success');
        }

        $message = $result ? $result : $this->text('Operation unavailable');
        $this->redirect('', $message, 'danger');
    }
950706
protected function complete($return, MvcEvent $event)
    {
        if (!is_object($return)) {
            if (ArrayUtils::hasStringKeys($return)) {
                $return = new ArrayObject($return, ArrayObject::ARRAY_AS_PROPS);
            }
        }
        $event->setResult($return);

        return $return;
    }
868457
public function afterAction($action, $result)
    {
        if (Yii::$app->user->isGuest) {
            return $result;
        } else {
            return $this->finishAuthorization();
        }
    }
1266000
public function sendResult($result)
    {
        if (@ob_get_length()) {
            @ob_end_clean();
        }
        if (isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'application/json') !== false) {
            header('Content-Type: application/json; charset=' . APP_CHARSET, true);
        } else {
            header('Content-Type: text/plain; charset=' . APP_CHARSET, true);
        }
        echo json_encode($result);
        die();
    }
502356
protected function done($result = null)
    {
        if ($result === null) {
            $this->event('error', $this->error());
        }

        $this->event('done', $result);
        $this->event = null;

        return $result;
    }
1027374
protected function setResult(Api\Result $result)
	{
		$this->total = $result->getTotal();
		$this->offset = 0;
		$this->max = $result->getIssuesCount();
		$this->issues = $result->getIssues();
		$this->startAt++;
	}
537370
public static function batchFinished($success, $results, $operations) {
    // For some reason imported sessions (offerings) got status 13 instead of 1.
    // So update them manually or dive into the code and find the bug.
    $query = \Drupal::database()->update('node_field_data');
    $query->fields(['status' => '1']);
    $query->condition('status', 13);
    $query->execute();

    if ($success) {
      drupal_set_message(t('Great success!'));
    }
    else {
      $error_operation = reset($operations);
      drupal_set_message(t('An error occurred while processing @operation with arguments : @args', [ '@operation' => $error_operation[0], '@args' => print_r($error_operation[0], TRUE) ]));
    }
  }
748213
protected function _makeResult(array $result) {
        return Result::make($result, $this->getClient())->setModelClass($this->_fullModelClass());
    }
640096
public function finish()
    {
        $session = $this->getSessionInstance();
        $pathCollection = $session->getSessionParam("aPath");
        $aSetupConfig = $session->getSessionParam("aSetupConfig");
        $aDB = $session->getSessionParam("aDB");

        try {
            $this->getUtilitiesInstance()->executeExternalRegenerateViewsCommand(); // move to last step possible?
        } catch (CommandExecutionFailedException $exception) {
            $this->handleCommandExecutionFailedException($exception);

            throw new SetupControllerExitException();
        } catch (Exception $exception) {
            $view = $this->getView();
            $view->setMessage($exception->getMessage());

            throw new SetupControllerExitException();
        }

        $this->setViewOptions(
            'finish.php',
            'STEP_6_TITLE',
            [
                "aPath" => $pathCollection,
                "aSetupConfig" => $aSetupConfig,
                "aDB" => $aDB,
                "blWritableConfig" => is_writable($pathCollection['sShopDir'] . "/config.inc.php")
            ]
        );
    }
62127
public function Finish(Nether\Project\RealBooter $realboot) {

		$realboot->ShowMessage('To finalise your setup you will need to run composer update to make sure you have all the packages and get your autoloader generated.');
		echo "\t$ php composer.phar update", PHP_EOL, PHP_EOL;

		$realboot->ShowMessage('If you already had all the packages installed prior (manually or via netherphp/world) or are having issues with undefined classes, try regenerating the autoloader.');
		echo "\t$ php composer.phar dump-autoload", PHP_EOL, PHP_EOL;

		return;
	}
1364232
public function send(Result $result = null)
    {
        if ($result) {
            // stop timer and add to meta
            if ($this->di->get('config')['application']['debugApp'] == true) {
                $timer = $this->di->get('stopwatch');
                $timer->end();

                $summary = [
                    'total_run_time' => round(($timer->endTime - $timer->startTime) * 1000, 2) . ' ms',
                    'laps' => []
                ];
                foreach ($timer->laps as $lap) {
                    $summary['laps'][$lap['name']] = round(($lap['end'] - $lap['start']) * 1000, 2) . ' ms';
                }
                $result->addMeta('stopwatch', $summary);
            }

            $this->_send($result->outputJSON());
        } else {
            $this->setStatusCode(204);
            $this->_send('');
        }

        // shouldn't we get out now?
        exit();
    }
747051
private function transformResult($result)
    {
        if ($this->actualDriver() === self::DRIVER_PREDIS && $result instanceof Status) {
            $result = $result->getPayload() === 'OK';
        }
        return $result;
    }
156698
function handleResults(results) {
    ctrl.matches = results;
    ctrl.hidden  = shouldHide();

    // If loading is in progress, then we'll end the progress. This is needed for example,
    // when the `clear` button was clicked, because there we always show the loading process, to prevent flashing.
    if (ctrl.loading) setLoading(false);

    if ($scope.selectOnMatch) selectItemOnMatch();

    positionDropdown();
    reportMessages(true, ReportType.Count);
  }
630906
protected function finishCloneOrderCheckout(array $result)
    {
        if (!empty($result['order']['order_id'])) {

            $log = array(
                'user_id' => $this->uid,
                'order_id' => $this->data_order['order_id'],
                'text' => $this->text('Cloned into order #@num', array('@num' => $result['order']['order_id']))
            );

            $this->order_history->add($log);

            $vars = array(
                '@num' => $this->data_order['order_id'],
                '@url' => $this->url("admin/sale/order/{$this->order_id}"),
                '@status' => $this->order->getStatusName($result['order']['status'])
            );

            $message = $this->text('Order has been cloned from order <a href="@url">@num</a>. Order status: @status', $vars);
            $this->redirect("admin/sale/order/{$result['order']['order_id']}", $message, 'success');
        }
    }
265780
protected function finishAddOrderCheckout(array $result)
    {
        if (!empty($result['order']['order_id'])) {

            $vars = array(
                '@num' => $result['order']['order_id'],
                '@name' => $result['order']['customer_name'],
                '@status' => $this->order->getStatusName($result['order']['status'])
            );

            $message = $this->text('Order #@num has been created for user @name. Order status: @status', $vars);
            $this->redirect("admin/sale/order/{$result['order']['order_id']}", $message, 'success');
        }
    }
1148843
private function callActionCallable($action, $result)
    {
        if (isset($this->actionsCallable[$action]) && is_callable($this->actionsCallable[$action])) {
            call_user_func($this->actionsCallable[$action], $result);
        }
    }
24649
protected function after_update($result) {
        $cache = \cache::make('tool_dataprivacy', 'purpose');
        $cache->set($this->get('id'), $this->to_record());
    }