Return 'Success' instead of 'Completed', required by the specified API.

@param EntityInterface $taskLogEntity
@return string
965324
protected function getTaskStatus(EntityInterface $taskLogEntity)
    {
        if ($taskLogEntity->getStatus()->isCreated()) {
            return __('In Progress');
        } else if ($taskLogEntity->getStatus()->isCompleted()){
            return __('Success');
        }

        return $taskLogEntity->getStatus()->getLabel();
    }
197186
protected function _afterSave(EntityInterface $comment)
    {
        $successMessage = $this->config('successMessage');
        if (is_callable($successMessage)) {
            $successMessage = $successMessage($comment, $this->_controller);
        }

        $this->_controller->Flash->success($successMessage, ['key' => 'commentsForm']);
        if ($this->config('redirectOnSuccess')) {
            $redirectTo = $this->config('redirectOnSuccess') === true ? $this->_controller->referer() : $this->config('redirectOnSuccess');
            $this->_controller->redirect($redirectTo);
        }
    }
414363
public function confirmEmailAction()
    {
        $token = $this->params()->fromRoute('id');
        try {
            $entityManager = $this->getEntityManager();
            if($token !== '' && $user = $entityManager->getRepository('CsnUser\Entity\User')->findOneBy(array('registrationToken' => $token))) {
                $user->setRegistrationToken(md5(uniqid(mt_rand(), true)));
                $user->setState($entityManager->find('CsnUser\Entity\State', 2));
                $user->setEmailConfirmed(1);
                $entityManager->persist($user);
                $entityManager->flush();
                
                $viewModel = new ViewModel(array(
                    'navMenu' => $this->getOptions()->getNavMenu(),
                ));
                $viewModel->setTemplate('csn-user/registration/confirm-email-success');
                return $viewModel;                        
            } else {
                return $this->redirect()->toRoute('user-index', array('action' => 'login'));
            }
        } catch (\Exception $e) {
            return $this->getServiceLocator()->get('csnuser_error_view')->createErrorView(
                $this->getTranslatorHelper()->translate('Something went wrong during the activation of your account! Please, try again later.'),
                $e,
                $this->getOptions()->getDisplayExceptions(),
                $this->getOptions()->getNavMenu()
            );
        }
    }
1268183
public function getPersisterForEntity(EntityInterface $entity)
    {
        return $this->isNewEntity($entity) ? $this->createPersister() : $this->createUpdateQuery();
    }
445445
public function getStatus()
    {
        try {
            if (!$this->hasRequestParameter(self::TASK_ID_PARAM)) {
                throw new \common_exception_MissingParameter(self::TASK_ID_PARAM, $this->getRequestURI());
            }

            $data = $this->getTaskLogReturnData(
                $this->getRequestParameter(self::TASK_ID_PARAM),
                CompileDelivery::class
            );
            $children = $this->getStatusesForChildren($this->getRequestParameter(self::TASK_ID_PARAM));
            $data['children'] = $children;
            $this->returnSuccess($data);
        } catch (\Exception $e) {
            $this->returnFailure($e);
        }
    }
783102
public function set(EntityInterface $entity): string
    {
        $hash = $entity->calculateHash();
        $content = $this->encodeContent($entity->writeData());
        $this->saveContent($hash, $content);
        return $hash;
    }
532319
public function getEntity($entityId)
    {
        if (isset($this->entities[$entityId])) {
            return $this->entities[$entityId];
        }

        $this->entities[$entityId] = $this->client->getEntity($entityId);

        return $this->entities[$entityId];
    }
1259988
protected function toErrorLog(EntityInterface $entity, $depth = 4)
    {
        return sprintf(
            '[%s] Persisting audit log failed. Data:' . PHP_EOL  . '%s',
            __CLASS__,
            Debugger::exportVar($entity, $depth)
        );
    }
1138069
public function handleEntityForm(FormInterface $form, $successMessage)
    {
        return $this->handleForm($form, $form->getData(), $successMessage, function ($entity, EntityManager $em) {
            $em->persist($entity);
            $em->flush();

            return true;
        });
    }
571625
public function GetVerified()
    {
        // mark as already-called
        $this->_isLoggedIn = FALSE;

        $gnLoginResult = $this->ExecuteCall("GetVerified", (object)[
            "loginId" => $this->_loginId
        ], GnResponseType::GnLogin, FALSE, PHP_INT_MAX);

        if ($gnLoginResult != NULL && !GnUtil::IsNullOrEmpty($gnLoginResult->LoginName)) {
            $this->_isLoggedIn = TRUE;
        }

        return $gnLoginResult;
    }
824886
private function getFailure(MethodInvocation $invocation, FailureInterface $failure, \ReflectionMethod $onFailure = null)
    {
        if ($onFailure) {
            return $onFailure->invoke($invocation->getThis(), $failure);
        }

        return $this->failureException($invocation, $failure);
    }
1032647
public function getTask(int $taskId)
    {
        if ( ! $this->validateId($taskId)) {
            return false;
        }

        $result = $this->get('tasks/' . $taskId);

        $status = $result->getStatusCode();
        if (200 === $status) {
            return json_decode($result->getBody()->getContents());
        }

        return false;
    }
417581
public synchronized String getTaskStatus(final int taskId) throws NotFoundException {

    final TaskEntity running = getTask(taskId, runningTasks);
    if (running != null) {
      return "Running : " + running.toString();
    }

    final TaskEntity waiting = getTask(taskId, taskQueue);
    if (waiting != null) {
      return "Waiting : " + waiting.toString();
    }

    final TaskEntity finished = getTask(taskId, finishedTasks);
    if (finished != null) {
      return "Finished : " + finished.toString();
    }

    final TaskEntity canceled = getTask(taskId, canceledTasks);
    if (canceled != null) {
      return "Canceled: " + canceled.toString();
    }

    throw new NotFoundException(
        new StringBuilder().append("Task with ID ").append(taskId).append(" is not found").toString());
  }
973133
public function success(UserInterface $user) {
        $repository = App::make('Ipunkt\SocialAuth\Repositories\SocialLoginRepository');
        /**
         * @var SocialLoginRepository $repository
         */
        $login = $repository->create();
        $login->setIdentifier($this->identifier);
        $login->setProvider($this->provider);
        $login->setUser($user->getAuthIdentifier());
        $success = $repository->save($login);
	    if($success)
		    Event::fire('social-auth.register', ['user' => $user, 'registerInfo' => $this]);
	    return $success;
    }
878560
protected function _afterRegister(EntityInterface $entity, $options) {
		if ($entity) {
			if ($options['emailVerification'] === true) {
				$this->sendVerificationEmail($entity, [
					'to' => $entity->get($this->_field('email'))
				]);
			}
		}

		return $entity;
	}
397009
private function hasFailed(TaskExecutionInterface $execution, \Exception $exception)
    {
        // this find is necessary because the storage could be
        // invalid (clear in doctrine) after handling an execution.
        $execution = $this->taskExecutionRepository->findByUuid($execution->getUuid());
        $execution->setException($exception->__toString());
        $execution->setStatus(TaskStatus::FAILED);

        $this->eventDispatcher->dispatch(
            Events::TASK_FAILED,
            new TaskExecutionEvent($execution->getTask(), $execution)
        );

        return $execution;
    }
554476
protected function checkIfPersonalNotification(EntityInterface $entity) {
    $recipient = $entity->getRecipient();
    $value = FALSE;
    if (!empty($recipient) && $recipient['0']['target_type'] === 'user') {
      // This could be personalised, but first lets check the destinations.
      $destinations = $entity->getDestinations();
      $is_notification = in_array('notifications', $destinations);
      // It is only personal if the only destination is notifications.
      if (count($destinations) <= 1 && $is_notification === TRUE) {
        $value = TRUE;
      }
    }
    return $value;
  }