closedquestion-8.x-3.x-dev/src/Question/CqListenerQuestionInterface.php
src/Question/CqListenerQuestionInterface.php
<?php
namespace Drupal\closedquestion\Question;
/**
* Interface CqListenerQuestionInterface.
*
* Defines the events a question listener can listen for.
*
* @package Drupal\closedquestion\Question
*/
interface CqListenerQuestionInterface {
/**
* Event for solution found.
*
* Fired when the question is solved for the first time.
*
* @param int $tries
* Number of tries needed.
*/
public function firstSolutionFound($tries);
/**
* Event for feedback generation.
*
* Fired when the question is generating it's feedback items, in case
* the listener wants to add items of it's own.
*
* @param CqQuestionInterface $caller
* The quetsion that wants to know if there is extra feedback to display.
* @param int $tries
* Number of tries needed.
*/
public function getExtraFeedbackItems(CqQuestionInterface $caller, $tries);
}
