protected function ContentTranslationUITestBase::getEditValues in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/content_translation/src/Tests/ContentTranslationUITestBase.php \Drupal\content_translation\Tests\ContentTranslationUITestBase::getEditValues()
Returns an edit array containing the values to be posted.
4 calls to ContentTranslationUITestBase::getEditValues()
- BlockContentTranslationUITest::getEditValues in core/
modules/ block_content/ src/ Tests/ BlockContentTranslationUITest.php - Returns an edit array containing the values to be posted.
- ContentTranslationUITestBase::doTestBasicTranslation in core/
modules/ content_translation/ src/ Tests/ ContentTranslationUITestBase.php - Tests the basic translation workflow.
- NodeTranslationUITest::testPublishedStatusNoFields in core/
modules/ node/ src/ Tests/ NodeTranslationUITest.php - Tests changing the published status on a node without fields.
- TermTranslationUITest::getEditValues in core/
modules/ taxonomy/ src/ Tests/ TermTranslationUITest.php - Returns an edit array containing the values to be posted.
2 methods override ContentTranslationUITestBase::getEditValues()
- BlockContentTranslationUITest::getEditValues in core/
modules/ block_content/ src/ Tests/ BlockContentTranslationUITest.php - Returns an edit array containing the values to be posted.
- TermTranslationUITest::getEditValues in core/
modules/ taxonomy/ src/ Tests/ TermTranslationUITest.php - Returns an edit array containing the values to be posted.
File
- core/
modules/ content_translation/ src/ Tests/ ContentTranslationUITestBase.php, line 365 - Contains \Drupal\content_translation\Tests\ContentTranslationUITestBase.
Class
- ContentTranslationUITestBase
- Tests the Content Translation UI.
Namespace
Drupal\content_translation\TestsCode
protected function getEditValues($values, $langcode, $new = FALSE) {
$edit = $values[$langcode];
$langcode = $new ? LanguageInterface::LANGCODE_NOT_SPECIFIED : $langcode;
foreach ($values[$langcode] as $property => $value) {
if (is_array($value)) {
$edit["{$property}[0][value]"] = $value[0]['value'];
unset($edit[$property]);
}
}
return $edit;
}