Commit c4fec19a authored by webchick's avatar webchick
Browse files

Issue #1871556 by tim.plunkett: Remove wrappers around entity_create().

parent 537c2084
......@@ -633,7 +633,7 @@ protected function instantiate_view($form, &$form_state) {
'base_table' => $this->base_table,
);
$view = views_create_view($values);
$view = entity_create('view', $values);
// Build all display options for this view.
$display_options = $this->build_display_options($form, $form_state);
......
......@@ -58,8 +58,7 @@ public function testHandlers() {
continue;
}
$view = views_new_view();
$view->set('base_table', $base_table);
$view = entity_create('view', array('base_table' => $base_table));
$view = new ViewExecutable($view);
// @todo The groupwise relationship is currently broken.
......
......@@ -34,7 +34,7 @@ public function testViewsUiAutocompleteTag() {
$suffix = $i % 2 ? 'odd' : 'even';
$tag = 'autocomplete_tag_test_' . $suffix . $this->randomName();
$tags[] = $tag;
views_create_view(array('tag' => $tag, 'name' => $this->randomName()))->save();
entity_create('view', array('tag' => $tag, 'name' => $this->randomName()))->save();
}
// Make sure just ten results are returns.
......
......@@ -1313,27 +1313,6 @@ function views_get_enabled_display_extenders() {
return drupal_map_assoc($enabled);
}
/**
* Create an empty view to work with.
*
* @return Drupal\views\Plugin\Core\Entity\View
* A fully formed, empty $view object. This object must be populated before
* it can be successfully saved.
*/
function views_new_view() {
return entity_create('view', array());
}
/**
* Creates a view from an array of values.
*
* @return Drupal\views\Plugin\Core\Entity\View
* A fully formed $view object with properties from the values passed in.
*/
function views_create_view(array $values = array()) {
return entity_create('view', $values);
}
/**
* Return a list of all views and display IDs that have a particular
* setting in their display's plugin settings.
......
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