Issue #1871556 by tim.plunkett: Remove wrappers around entity_create().
parent
537c208497
commit
c4fec19a1e
|
@ -633,7 +633,7 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface {
|
||||||
'base_table' => $this->base_table,
|
'base_table' => $this->base_table,
|
||||||
);
|
);
|
||||||
|
|
||||||
$view = views_create_view($values);
|
$view = entity_create('view', $values);
|
||||||
|
|
||||||
// Build all display options for this view.
|
// Build all display options for this view.
|
||||||
$display_options = $this->build_display_options($form, $form_state);
|
$display_options = $this->build_display_options($form, $form_state);
|
||||||
|
|
|
@ -58,8 +58,7 @@ class HandlerAllTest extends HandlerTestBase {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$view = views_new_view();
|
$view = entity_create('view', array('base_table' => $base_table));
|
||||||
$view->set('base_table', $base_table);
|
|
||||||
$view = new ViewExecutable($view);
|
$view = new ViewExecutable($view);
|
||||||
|
|
||||||
// @todo The groupwise relationship is currently broken.
|
// @todo The groupwise relationship is currently broken.
|
||||||
|
|
|
@ -34,7 +34,7 @@ class TagTest extends ViewUnitTestBase {
|
||||||
$suffix = $i % 2 ? 'odd' : 'even';
|
$suffix = $i % 2 ? 'odd' : 'even';
|
||||||
$tag = 'autocomplete_tag_test_' . $suffix . $this->randomName();
|
$tag = 'autocomplete_tag_test_' . $suffix . $this->randomName();
|
||||||
$tags[] = $tag;
|
$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.
|
// Make sure just ten results are returns.
|
||||||
|
|
|
@ -1313,27 +1313,6 @@ function views_get_enabled_display_extenders() {
|
||||||
return drupal_map_assoc($enabled);
|
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
|
* Return a list of all views and display IDs that have a particular
|
||||||
* setting in their display's plugin settings.
|
* setting in their display's plugin settings.
|
||||||
|
|
Loading…
Reference in New Issue