class FeedbackAction

Traits

Properties

TranslationController $mod from  CommonOperationsTrait

Methods

buildLangStrings()

Builds a map of available system languages in $lang_strings: ['de' => 'DE_DE', 'en' => 'EN_GB', ...]

void
createFeedbackJob(TranslationFeedback $feedbackModel, bool $forceExecution = false)

No description

createTranslationJob(string $content, string $target_model, int $target_id, string $language, bool $add_to_search_index = true, int $priority = 1)

Creates a translation_job model

string
getDbLanguageString(string $language)

No description

array
getLangStrings()

Getter for $lang_strings

bool
processFeedbackJob(TranslationJob $job)

No description

Details

protected buildLangStrings()

Builds a map of available system languages in $lang_strings: ['de' => 'DE_DE', 'en' => 'EN_GB', ...]

at line 22
void createFeedbackJob(TranslationFeedback $feedbackModel, bool $forceExecution = false)

No description

Parameters

TranslationFeedback $feedbackModel
bool $forceExecution

If true processFeedbackJob() is executed immediately

Return Value

void

TranslationJob createTranslationJob(string $content, string $target_model, int $target_id, string $language, bool $add_to_search_index = true, int $priority = 1)

Creates a translation_job model

Parameters

string $content
string $target_model
int $target_id
string $language
bool $add_to_search_index
int $priority

Return Value

TranslationJob

string getDbLanguageString(string $language)

No description

Parameters

string $language

The language to get the db string for eg.: 'de'

Return Value

string

$db_string The i18n db field representation of lang eg.: 'DE_DE'

Exceptions

TranslationException

If language string could not be mapped

array getLangStrings()

Getter for $lang_strings

Return Value

array

at line 48
bool processFeedbackJob(TranslationJob $job)

No description

Parameters

TranslationJob $job

Return Value

bool

Was the job processed successfully