public function PermissionsByTermDrupalSubContext::openNodeEditFormByTitle in Permissions by Term 8.2
@Then /^I open node edit form by node title "([^"]*)"$/
Parameters
string $title:
File
- tests/
src/ Behat/ Context/ permissions_by_term.behat.inc, line 152
Class
- PermissionsByTermDrupalSubContext
- Class PermissionsByTermContext
Namespace
Drupal\Tests\permissions_by_term\Behat\PermissionsByTermDrupalSubContextCode
public function openNodeEditFormByTitle($title) {
$query = \Drupal::service('database')
->select('node_field_data', 'nfd')
->fields('nfd', [
'nid',
])
->condition('nfd.title', $title);
$this
->visitPath('/node/' . $query
->execute()
->fetchField() . '/edit');
}