protected function InlineEntityFormTestBase::getButtonName in Inline Entity Form 7
Gets IEF button name.
Parameters
array $xpath: Xpath of the button.
Return value
string The name of the button.
11 calls to InlineEntityFormTestBase::getButtonName()
- MultipleValuesWidgetTest::cancelExistingMultiForm in tests/
multiple_values_widget.test - Closes the existing node form on the "multi" field.
- MultipleValuesWidgetTest::checkExistingValidationExpectation in tests/
multiple_values_widget.test - Checks that an invalid value for an existing node will be display the expected error.
- MultipleValuesWidgetTest::checkNestedEntityEditing in tests/
multiple_values_widget.test - Checks that nested IEF entity references can be edit and saved.
- MultipleValuesWidgetTest::openMultiExistingForm in tests/
multiple_values_widget.test - Opens the existing node form on the "multi" field.
- MultipleValuesWidgetTest::setupNestedMultipleForm in tests/
multiple_values_widget.test - Set up the ief_test_nested1 node add form.
File
- tests/
inline_entity_form_test_base.test, line 19
Class
- InlineEntityFormTestBase
- Base class for Inline Entity Form tests.
Code
protected function getButtonName($xpath) {
$retval = '';
/** @var \SimpleXMLElement[] $elements */
if ($elements = $this
->xpath($xpath)) {
foreach ($elements[0]
->attributes() as $name => $value) {
if ($name == 'name') {
$retval = $value;
break;
}
}
}
return $retval;
}