Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
56849e2a
Commit
56849e2a
authored
Aug 27, 2012
by
dawehner
Committed by
tim.plunkett
Oct 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some minor cleanup of some docs
parent
79629a5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
views.module
views.module
+18
-14
No files found.
views.module
View file @
56849e2a
...
...
@@ -1714,36 +1714,40 @@ function views_get_views_as_options($views_only = FALSE, $filter = 'all', $exclu
}
/**
* Returns TRUE if a view is enabled, FALSE otherwise.
* Returns whether the view is enabled.
*
* @var Drupal\views\View
* The view object of which the status is checked.
*
* @return bool
* Returns TRUE if a view is enabled, FALSE otherwise.
*/
function
views_view_is_enabled
(
$view
)
{
return
empty
(
$view
->
d
isabled
);
return
$view
->
is
En
abled
(
);
}
/**
* Returns TRUE if a view is disabled, FALSE otherwise.
* Returns whether the view is disabled.
*
* @var Drupal\views\View
* The view object of which the status is checked.
*
* @return bool
* Returns TRUE if a view is disabled, FALSE otherwise.
*/
function
views_view_is_disabled
(
$view
)
{
return
!
empty
(
$view
->
d
isabled
);
return
!
$view
->
is
En
abled
(
);
}
/**
* Get a view from the database or from default views.
*
* This function is just a static wrapper around views::load(). This function
* isn't called 'views_load()' primarily because it might get a view
* from the default views which aren't technically loaded from the database.
* Get a view from the config.
*
* @param $name
* The name of the view.
* @param $reset
* If TRUE, reset this entry in the load cache.
* @return Drupal\views\View
* A reference to the $view object. Use $reset if you're sure you want
* a fresh one.
* A reference to the $view object.
*/
function
views_get_view
(
$name
)
{
$view
=
entity_load
(
'view'
,
$name
);
if
(
$view
)
{
$view
->
update
();
...
...
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