/* (non-PHPdoc)
@see \CrudGenerator\Context\ContextInterface::confirm()
961563
public function confirm($text, $uniqueKey)
    {
        return (bool) $this->question->ask(
            $this->input,
            $this->output,
            new ConfirmationQuestion(
                $text . ' y/n'
            )
        );
    }
160528
protected function confirm($message, $default = null)
    {
        /** @var QuestionHelper $q */
        $q = $this->getHelperSet()->get('question');

        $question = new ConfirmationQuestion(
            $message . ($default ? (sprintf(' [%s]', $default ? 'yes' : 'no')) : '') . ' : ', true === $default
        );

        $question->setMaxAttempts(3);

        $response = $q->ask($this->getInput(), $this->getOutput(), $question);

        return $response;
    }
645186
public function handleConfirmation($request)
    {
        // Find the action handler
        $action = $request->param('BatchAction');
        $actionHandler = $this->actionByName($action);

        // Sanitise ID list and query the database for apges
        $csvIDs = $request->requestVar('csvIDs');
        $ids = $this->cleanIDs($csvIDs);

        // Check dialog
        if ($actionHandler->hasMethod('confirmationDialog')) {
            $response = new HTTPResponse(json_encode($actionHandler->confirmationDialog($ids)));
        } else {
            $response = new HTTPResponse(json_encode(array('alert' => false)));
        }

        $response->addHeader("Content-type", "application/json");
        return $response;
    }
607643
public static function validateMethod($confirmation, $positive, $negative)
    {
        $lowercase = \strtolower($confirmation);
        if ($positive === $lowercase || $negative === $lowercase) {
            return $lowercase;
        }

        return false;
    }
1058935
public function confirm($prompt)
    {
        if ($this->hasSttyAvailable()) {
            $confirm = $this->climate->confirm($prompt);

            return $confirm->confirmed();
        }
        return '';
    }
732766
public function confirm($question, $default = false)
    {
        $que = new ConfirmationQuestion($question, $default);
        $helper = new SymfonyQuestionHelper();
        return $helper->ask($this->input, $this->output, $que);
    }
251127
public function setConfirmText(
        string $text = null,
        string $colorOk = null,
        string $colorCancel = null,
        string $textOk = null,
        string $textCancel = null
    ): ButtonInterface {
        if ($this->isVisibility()) {
            if ($text) {
                $this->confirmText = $text;
            }
            if ($colorOk) {
                $this->confirmColorOk = $colorOk;
            }
            if ($colorCancel) {
                $this->confirmColorCancel = $colorCancel;
            }
            if ($textOk) {
                $this->confirmTextOk = $textOk;
            }
            if ($textCancel) {
                $this->confirmTextCancel = $textCancel;
            }
        }

        return $this;
    }
1344427
public function confirm($question, $default = true)
	{
		$dialog = $this->getHelperSet()->get('dialog');

		return $dialog->askConfirmation($this->output, "<question>$question</question>", $default);
	}
848490
public function confirmed($isConfirmed = true)
    {
        $model = $this->noInitModel;
        if (!is_string($model->confirmationAttribute)) {
            return $this;
        }
        return $this->andWhere([$model->confirmationAttribute => $isConfirmed]);
    }
653889
public function getConfirmCode()
    {
        $confirmCodeAttribute = $this->confirmCodeAttribute;
        return (is_string($confirmCodeAttribute) && !empty($confirmCodeAttribute)) ? $this->$confirmCodeAttribute : null;
    }
718740
public function onInitConfirmation($event)
    {
        $sender = $event->sender;
        /* @var $sender static */
        if (!$sender->confirmationAttribute || empty($sender->confirmationAttribute)) {
            return;
        }
        $sender->confirmation = static::$confirmFalse;
        $sender->confirmCode = '';
    }
825015
public function activate_confirm($pThemeID, $token)
    {
        $l = Theme::getByID($pThemeID);
        $val = Loader::helper('validation/error');
        $valt = Loader::helper('validation/token');
        if (!$valt->validate('activate', $token)) {
            $val->add($valt->getErrorMessage());
            $this->set('error', $val);
        } elseif (!is_object($l)) {
            $val->add('Invalid Theme');
            $this->set('error', $val);
        } else {
            $l->applyToSite();
            $this->redirect('/dashboard/pages/themes/inspect', $l->getThemeID(), 'activate');
        }
        $this->view();
    }
1136485
private function askConfirmation(InputInterface $input, OutputInterface $output, $question, $default)
    {
        if (!class_exists(ConfirmationQuestion::class)) {
            $dialog = $this->getHelperSet()->get('dialog');

            return $dialog->askConfirmation($output, $question, $default);
        }

        $questionHelper = $this->getHelperSet()->get('question');
        $question = new ConfirmationQuestion($question, $default);

        return $questionHelper->ask($input, $output, $question);
    }
454559
private function askConfirmation(InputInterface $input, OutputInterface $output, $question, $default)
    {
        /** @var QuestionHelper $questionHelper */
        $questionHelper = $this->getHelperSet()->get('question');
        $question = new ConfirmationQuestion($question, $default);

        return (bool) $questionHelper->ask($input, $output, $question);
    }
326852
void confirmCancel() {

        if (m_saveButton.isEnabled()) {
            CmsConfirmDialog dialog = new CmsConfirmDialog(
                org.opencms.gwt.client.Messages.get().key(org.opencms.gwt.client.Messages.GUI_DIALOG_RESET_TITLE_0),
                org.opencms.gwt.client.Messages.get().key(org.opencms.gwt.client.Messages.GUI_DIALOG_RESET_TEXT_0));
            dialog.setHandler(new I_CmsConfirmDialogHandler() {

                public void onClose() {

                    // nothing to do
                }

                public void onOk() {

                    cancelEdit();
                }
            });
            dialog.center();
        } else {
            cancelEdit();
        }
    }
15681
private function confirmQuery ($result)
	{
		if ($result) return;
	    $outputMessage = "";
		if (DEPLOYMENT_STATE == "local"):
		    $outputMessage = "Database query failed: ".mysqli_error($this->connection)."<br /><br />";
		    $outputMessage .= "Last SQL query: ".static::lastQuery();
	    else:
		    $outputMessage = "A DATABASE ERROR OCCURRED TRY AGAIN LATER OR CONTACT ADMINISTRATOR<br /><br />";
		    $log = "Database query failed: ".mysqli_error($this->connection)."\nLast SQL query: ".static::lastQuery();
		    (new Log($log, "ERROR"))->setLogFile("DBLog.txt")->logMessage();
	    endif;
	    die($outputMessage);
	}
1269475
public function confirmAction()
	{
		$params = [];
		$shop = $this->container->get( 'shop' );

		foreach( $this->container->getParameter( 'aimeos_shop.page' )['checkout-confirm'] as $name )
		{
			$params['aiheader'][$name] = $shop->get( $name )->getHeader();
			$params['aibody'][$name] = $shop->get( $name )->getBody();
		}

		$response = $this->render( 'AimeosShopBundle:Checkout:confirm.html.twig', $params );
		$response->headers->set('Cache-Control', 'no-store');
		return $response;
	}