Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
c4fec19a
Commit
c4fec19a
authored
Dec 26, 2012
by
webchick
Browse files
Issue
#1871556
by tim.plunkett: Remove wrappers around entity_create().
parent
537c2084
Changes
4
Hide whitespace changes
Inline
Side-by-side
core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php
View file @
c4fec19a
...
...
@@ -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
);
...
...
core/modules/views/lib/Drupal/views/Tests/Handler/HandlerAllTest.php
View file @
c4fec19a
...
...
@@ -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.
...
...
core/modules/views/lib/Drupal/views/Tests/UI/TagTest.php
View file @
c4fec19a
...
...
@@ -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.
...
...
core/modules/views/views.module
View file @
c4fec19a
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment