Commit d9ed0265 authored by webchick's avatar webchick

Issue #2447313 by dawehner: Views UI misses entity row plugins

parent ee7eb60c
......@@ -99,7 +99,7 @@ public function getDerivativeDefinitions($base_plugin_definition) {
'provider' => 'views',
'title' => $entity_type->getLabel(),
'help' => t('Display the @label', array('@label' => $entity_type->getLabel())),
'base' => array($base_table),
'base' => array($entity_type->getDataTable() ?: $entity_type->getBaseTable()),
'entity_type' => $entity_type_id,
'display_types' => array('normal'),
'class' => $base_plugin_definition['class'],
......
......@@ -76,6 +76,17 @@ public function testRowUI() {
$this->drupalGet($row_plugin_url);
$this->assertResponse(200);
$this->assertFieldByName('row[type]', 'fields', 'Make sure that the fields got saved as used row plugin.');
// Ensure that entity row plugins appear.
$view_name = 'content';
$row_plugin_url = "admin/structure/views/nojs/display/$view_name/default/row";
$row_options_url = "admin/structure/views/nojs/display/$view_name/default/row_options";
$this->drupalGet($row_plugin_url);
$this->assertFieldByName('row[type]', 'entity:node');
$this->drupalPostForm(NULL, ['row[type]' => 'entity:node'], t('Apply'));
$this->assertUrl($row_options_url);
$this->assertFieldByName('row_options[view_mode]', 'teaser');
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment