Return success
@return array
5406
protected function success()
    {
        $this->cleanup();

        if (empty($this->incidents)) {
            Log::warning(
                'The collector ' . config("{$this->configBase}.collector.name") . ' did not return any incidents ' .
                'which should be investigated for collector and/or configuration errors'
            );
        }

        Log::info(
            get_class($this) . ': ' .
            'Collector run completed for collector : ' . config("{$this->configBase}.collector.name")
        );

        return [
            'errorStatus'   => false,
            'errorMessage'  => 'Data successfully collected',
            'warningCount'  => $this->warningCount,
            'data'          => $this->incidents,
        ];
    }
755016
protected function success($results = null)
    {
        $this->trigger('json-success', $this, $results);
        $this->trigger('response-success', $this, $results);

        $json = array('error' => false);

        if($results) {
            $json['results'] = $results;
        }

        $body = json_encode($json, JSON_PRETTY_PRINT);

        $this->response
            ->set('headers', 'Content-Type', 'text/json')
            ->set('body', $body);

        return $body;
    }
107064
public function getResults()
    {
        $page = $this->getRequestParameter('page');
        $limit = $this->getRequestParameter('rows');
        $order = $this->getRequestParameter('sortby');
        $sort = $this->getRequestParameter('sortorder');
        $query = $this->getRequestParameter('filterquery');
        $start = $limit * $page - $limit;

        $gau = array(
            'order' => $order,
            'orderdir' => strtoupper($sort),
            'offset' => $start,
            'limit' => $limit,
            'recursive' => true
        );

        try {
            $data = array();
            $readOnly = array();
            $user = $this->getSession()->getUser();
            $rights = array(
                'view' => !AclProxy::hasAccess($user, 'oat\taoOutcomeUi\controller\Results', 'viewResult', array()),
                'delete' => !AclProxy::hasAccess($user, 'oat\taoOutcomeUi\controller\Results', 'delete', array()));
            if ($query) {
                $resultsData = new ResultsMonitoringDatatable(DatatableRequest::fromGlobals());
                $resultsData->setServiceLocator($this->getServiceLocator());
                $payload = $resultsData->getPayload();
                $results = $payload['data'];
                $count = $payload['records'];
            } else {
                $delivery = new \core_kernel_classes_Resource(tao_helpers_Uri::decode($this->getRequestParameter('classUri')));
                $this->getResultStorage($delivery);
                $results = $this->getResultsService()->getImplementation()->getResultByDelivery(array($delivery->getUri()), $gau);
                $count = $this->getResultsService()->getImplementation()->countResultByDelivery(array($delivery->getUri()));
            }

            foreach ($results as $res) {

                $deliveryExecution = $this->getServiceProxy()->getDeliveryExecution($res['deliveryResultIdentifier']);

                try {
                    $startTime = \tao_helpers_Date::displayeDate($deliveryExecution->getStartTime());
                } catch (\common_exception_NotFound $e) {
                    $this->logWarning($e->getMessage());
                    $startTime = '';
                }

                $user = UserHelper::getUser($res['testTakerIdentifier']);
                $userName = UserHelper::getUserName($user, true);
                if (empty($userName)) {
                    $userName = $res['testTakerIdentifier'];
                }

                $data[] = array(
                    'id' => $deliveryExecution->getIdentifier(),
                    'ttaker' => _dh($userName),
                    'time' => $startTime,
                );

                $readOnly[$deliveryExecution->getIdentifier()] = $rights;
            }

            $this->returnJson(array(
                'data' => $data,
                'page' => floor($start / $limit) + 1,
                'total' => ceil($count / $limit),
                'records' => count($data),
                'readonly' => $readOnly
            ));
        } catch (\common_exception_Error $e) {
            $this->returnJson(array(
                'error' => $e->getMessage()
            ));
        }
    }
319589
public function successAction()
    {
        // get the response data
        $response = $this->getRequest()->getParams();

        // process
        try {
            $result = $this->validateResultUrl($response);

            if ($result) {
                $session = $this->_getCheckout();
                $session->unsAdyenRealOrderId();
                $session->setQuoteId($session->getAdyenQuoteId(true));
                $session->getQuote()->setIsActive(false)->save();
                $this->_redirect('checkout/onepage/success', array('utm_nooverride' => '1'));
            } else {
                $this->cancel();
            }
        } catch (Exception $e) {
            Mage::logException($e);
            throw $e;
        }
    }
246567
public function getSuccessful()
    {
        $results = [];
        foreach ($this->hash as $key) {
            if (!($this->hash[$key] instanceof \Exception)) {
                $results[] = $this->hash[$key];
            }
        }

        return $results;
    }
28062
public function Success ($params = FALSE)
	{
		
		if ($params)
		{
			$this->result	= array_merge ($this->result, $params);
		}
		
		$this->result['status']		= 'ok';
		return TRUE;
	}
81299
protected function _success()
    {
        $subject = $this->_subject(['success' => true]);

        $this->_trigger('afterVerify', $subject);
        $this->setFlash('success', $subject);

        $redirectUrl = $this->config('redirectUrl');

        if (!$redirectUrl && $this->_controller()->components()->has('Auth')) {
            $redirectUrl = $this->_controller()->Auth->config('loginAction');
        }

        return $this->_redirect($subject, $redirectUrl);
    }
210621
public function getSuccessfullyResults(): ResultCollection
    {
        $successfullyResults = array_filter($this->results, function (Result $result) {
            return $result->isSuccessfully();
        });

        return new self(...$successfullyResults);
    }
1088369
public function result()
    {
        // Don't bother if it didn't go well
        if ($this->_res === false) {
            return false;
        }

        // Store rows here
        $rows = [];

        // Start showing connections
        $rows[] = array(
            'type' => 'header',
            'columns' =>

            // Not hiding mac address?
            !$this->_hide_mac ? array(
                'IP Address',
                'MAC Address',
                'Hostname',
                'Lease Start',
                'Lease End',
            ) :

            // Hiding it indeed
                array(
                'IP Address',
                'Hostname',
                'Lease Start',
                'Lease End',
            ),
        );

        // Append each lease
        for ($i = 0, $num_leases = count($this->_leases); $i < $num_leases; ++$i) {
            $rows[] = array(
                'type' => 'values',
                'columns' =>

                // Not hiding mac addresses?
                !$this->_hide_mac ? array(
                    $this->_leases[$i]['ip'],
                    $this->_leases[$i]['mac'],
                    array_key_exists('hostname', $this->_leases[$i]) ?
                        $this->_leases[$i]['hostname'] : '<em>unknown</em>',
                    date(self::DATE_FORMAT, $this->_leases[$i]['lease_start']),
                    date(self::DATE_FORMAT, $this->_leases[$i]['lease_end']),
                ) :

                // Hiding them indeed
                array(
                    $this->_leases[$i]['ip'],
                    array_key_exists('hostname', $this->_leases[$i]) ?
                        $this->_leases[$i]['hostname'] : '<em>unknown</em>',
                    date(self::DATE_FORMAT, $this->_leases[$i]['lease_start']),
                    date(self::DATE_FORMAT, $this->_leases[$i]['lease_end']),
                ),
            );
        }

        // Give it off
        return array(
            'root_title' => 'DHCPD IP Leases',
            'rows' => $rows,
        );
    }
938232
public function getProcessedResult()
    {
        $status = StepResult::SKIPPED;

        if (!empty(static::$resultLabels[$this->getResultCode()])) {
            $status = static::$resultLabels[$this->getResultCode()];
        }

        return [
            'status' => $status,
            'error_message' => $this->getException(),
            'duration' => $this->getDuration() * 1000 * 1000000,
        ];
    }
7373
public function after() {
		if($this->_handle_ajax == true)
		{
			if($this->request->is_ajax())
			{
				$return = array();

				if(RD::has_messages() == false)
				{
					$return['status'] = 'success';
					$return['response'] = [''];
				}
				else if(RD::get_current(RD::ERROR) != null)
				{
					$return['status'] = 'error';
					$return['errors'] = RD::get_current(RD::ERROR);
				}
				else if(RD::get_current(array(RD::SUCCESS, RD::INFO)) != null)
				{
					$return['status'] = 'success';
					$return['response'] = RD::get_current(array(RD::SUCCESS, RD::INFO, RD::WARNING));
				}
				else
				{
					$return['status'] = 'success';
					$return['response'] = RD::get_current();
				}

				$this->response->headers('Content-Type', 'application/json');
				$this->response->body(json_encode($return));
			}
			else
			{
				//otherwise flash the messages so they can be used on the next page load
				if(RD::has_messages())
					RD::persist();

				parent::after();
			}
		}
		else
			parent::after();
	}
616172
public function result()
    {

        // Don't bother if it didn't go well
        if ($this->_res == false) {
            return false;
        }

        // it did; continue
        else {

            // Store rows here
            $rows = [];

            // start off printers list
            $rows[] = array(
                'type' => 'header',
                'columns' => array(
                    array(5, 'Printers'),
                ),
            );
            $rows[] = array(
                'type' => 'header',
                'columns' => array(
                    'Name',
                    array(4, 'Status'),
                ),
            );

            // show printers if we have them
            if (count($this->_res['printers']) == 0) {
                $rows[] = array('type' => 'none', 'columns' => array(array(5, 'None found')));
            } else {
                foreach ($this->_res['printers'] as $printer) {
                    $rows[] = array(
                        'type' => 'values',
                        'columns' => array(
                            $printer['name'],
                            array(4, $printer['status']),
                        ),
                    );
                }
            }

            // show printer queue list
            $rows[] = array(
                'type' => 'header',
                'columns' => array(
                    array(5, 'Queue'),
                ),
            );

            $rows[] = array(
                'type' => 'header',
                'columns' => array(
                    'Rank',
                    'Owner',
                    'Job',
                    'Files',
                    'Size',
                ),
            );

            // Go through each item in the lsit
            if (count($this->_res['queue']) == 0) {
                $rows[] = array('type' => 'none', 'columns' => array(array(5, 'Empty')));
            } else {
                foreach ($this->_res['queue'] as $job) {
                    $rows[] = array(
                        'type' => 'values',
                        'columns' => array(
                            $job['rank'],
                            $job['owner'],
                            $job['job'],
                            $job['files'],
                            $job['size'],
                        ),
                    );
                }
            }

            // give info
            return array(
                'root_title' => 'CUPS Printer Status',
                'rows' => $rows,
            );
        }
    }
819966
public function confirm()
    {
        Yii::$app->get('hiart')->disableAuth();
        try {
            $confirmation = Contact::perform('confirm-email', [
                'confirm_data' => Yii::$app->request->get(),
            ]);

            return [
                'success' => true,
            ];
        } catch (\hiqdev\hiart\ResponseErrorException $e) {
            return [
                'success' => false,
                'message' => $e->getMessage(),
            ];
        }
    }
129827
public function result()
     {
         foreach (array_keys((array) $this->_pci_devices) as $v) {
             foreach ($this->_pci_devices[$v] as $d) {
                 $this->_result[] = array('vendor' => $d['vendor'], 'device' => $d['device'], 'type' => 'PCI');
             }
         }
         foreach (array_keys((array) $this->_usb_devices) as $v) {
             foreach ($this->_usb_devices[$v] as $d) {
                 $this->_result[] = array('vendor' => $d['vendor'], 'device' => $d['device'], 'type' => 'USB');
             }
         }

         return $this->_result;
     }
281964
public function getResult ()
	{
		
		// If the status is not set
		
		if (!isset ($this->result['status']))
		{
			
			// Set it
			
			$this->result['status']	= 'fail';
			
			// If no message is set
			
			if (!isset ($this->result['message']))
			{
				
				// Set it
				
				$this->result['message']	= 'no method return status set';
				
			}
			
		}
		
		// Return result
		
		return $this->result;
		
	}
899053
protected function getResult()
    {
        while ($this->result instanceof Promise && null !== $this->result->result)
        {
            $this->result = $this->result->result;
        }

        return $this->result;
    }
646060
public function getArray()
    {
        if (!$this->result) {
            return array();
        } // No hay manipuladores
        if (!is_array($this->result)) {
            return array($this->result);
        } // El resultado es solo 1, generar un array
        return $this->result; //
    }