Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
315
Merge Requests
315
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
c29f2e2d
Commit
c29f2e2d
authored
Aug 29, 2012
by
damiankloip
Committed by
tim.plunkett
Oct 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#1762352
by aspilicious, dawehner, damiankloip: Clean up /camelCase methods on View.
parent
b774fcbf
Changes
54
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
54 changed files
with
397 additions
and
404 deletions
+397
-404
includes/admin.inc
includes/admin.inc
+46
-46
lib/Drupal/views/Analyzer.php
lib/Drupal/views/Analyzer.php
+1
-1
lib/Drupal/views/Plugin/views/HandlerBase.php
lib/Drupal/views/Plugin/views/HandlerBase.php
+4
-4
lib/Drupal/views/Plugin/views/PluginBase.php
lib/Drupal/views/Plugin/views/PluginBase.php
+2
-2
lib/Drupal/views/Plugin/views/area/Result.php
lib/Drupal/views/Plugin/views/area/Result.php
+2
-2
lib/Drupal/views/Plugin/views/area/View.php
lib/Drupal/views/Plugin/views/area/View.php
+1
-1
lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
...Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
+1
-1
lib/Drupal/views/Plugin/views/cache/CachePluginBase.php
lib/Drupal/views/Plugin/views/cache/CachePluginBase.php
+2
-2
lib/Drupal/views/Plugin/views/display/Attachment.php
lib/Drupal/views/Plugin/views/display/Attachment.php
+4
-4
lib/Drupal/views/Plugin/views/display/Block.php
lib/Drupal/views/Plugin/views/display/Block.php
+4
-4
lib/Drupal/views/Plugin/views/display/DefaultDisplay.php
lib/Drupal/views/Plugin/views/display/DefaultDisplay.php
+4
-4
lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
+14
-14
lib/Drupal/views/Plugin/views/display/Feed.php
lib/Drupal/views/Plugin/views/display/Feed.php
+4
-4
lib/Drupal/views/Plugin/views/display/Page.php
lib/Drupal/views/Plugin/views/display/Page.php
+3
-3
lib/Drupal/views/Plugin/views/field/Counter.php
lib/Drupal/views/Plugin/views/field/Counter.php
+1
-1
lib/Drupal/views/Plugin/views/filter/Combine.php
lib/Drupal/views/Plugin/views/filter/Combine.php
+1
-1
lib/Drupal/views/Plugin/views/localization/LocalizationPluginBase.php
...iews/Plugin/views/localization/LocalizationPluginBase.php
+1
-1
lib/Drupal/views/Plugin/views/query/Sql.php
lib/Drupal/views/Plugin/views/query/Sql.php
+1
-1
lib/Drupal/views/Plugin/views/style/DefaultSummary.php
lib/Drupal/views/Plugin/views/style/DefaultSummary.php
+1
-1
lib/Drupal/views/Plugin/views/style/Rss.php
lib/Drupal/views/Plugin/views/style/Rss.php
+2
-2
lib/Drupal/views/Tests/BasicTest.php
lib/Drupal/views/Tests/BasicTest.php
+1
-1
lib/Drupal/views/Tests/GlossaryTest.php
lib/Drupal/views/Tests/GlossaryTest.php
+2
-2
lib/Drupal/views/Tests/Handler/ArgumentStringTest.php
lib/Drupal/views/Tests/Handler/ArgumentStringTest.php
+1
-1
lib/Drupal/views/Tests/Handler/FieldTest.php
lib/Drupal/views/Tests/Handler/FieldTest.php
+4
-4
lib/Drupal/views/Tests/Handler/FilterDateTest.php
lib/Drupal/views/Tests/Handler/FilterDateTest.php
+18
-18
lib/Drupal/views/Tests/Handler/FilterEqualityTest.php
lib/Drupal/views/Tests/Handler/FilterEqualityTest.php
+2
-2
lib/Drupal/views/Tests/Handler/FilterInOperatorTest.php
lib/Drupal/views/Tests/Handler/FilterInOperatorTest.php
+2
-2
lib/Drupal/views/Tests/Handler/FilterNumericTest.php
lib/Drupal/views/Tests/Handler/FilterNumericTest.php
+7
-7
lib/Drupal/views/Tests/Handler/FilterStringTest.php
lib/Drupal/views/Tests/Handler/FilterStringTest.php
+13
-13
lib/Drupal/views/Tests/Plugin/AccessTest.php
lib/Drupal/views/Tests/Plugin/AccessTest.php
+8
-8
lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php
lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php
+5
-7
lib/Drupal/views/Tests/Plugin/ArgumentValidatorTest.php
lib/Drupal/views/Tests/Plugin/ArgumentValidatorTest.php
+6
-6
lib/Drupal/views/Tests/Plugin/CacheTest.php
lib/Drupal/views/Tests/Plugin/CacheTest.php
+8
-8
lib/Drupal/views/Tests/Plugin/DisplayTest.php
lib/Drupal/views/Tests/Plugin/DisplayTest.php
+1
-1
lib/Drupal/views/Tests/Plugin/ExposedFormTest.php
lib/Drupal/views/Tests/Plugin/ExposedFormTest.php
+1
-1
lib/Drupal/views/Tests/Plugin/PagerTest.php
lib/Drupal/views/Tests/Plugin/PagerTest.php
+31
-31
lib/Drupal/views/Tests/Plugin/StyleTest.php
lib/Drupal/views/Tests/Plugin/StyleTest.php
+6
-6
lib/Drupal/views/Tests/QueryGroupByTest.php
lib/Drupal/views/Tests/QueryGroupByTest.php
+3
-3
lib/Drupal/views/Tests/TranslatableTest.php
lib/Drupal/views/Tests/TranslatableTest.php
+4
-4
lib/Drupal/views/Tests/User/ArgumentDefaultTest.php
lib/Drupal/views/Tests/User/ArgumentDefaultTest.php
+3
-3
lib/Drupal/views/Tests/User/ArgumentValidateTest.php
lib/Drupal/views/Tests/User/ArgumentValidateTest.php
+9
-9
lib/Drupal/views/Tests/User/HandlerFieldUserNameTest.php
lib/Drupal/views/Tests/User/HandlerFieldUserNameTest.php
+1
-1
lib/Drupal/views/Tests/User/UserTest.php
lib/Drupal/views/Tests/User/UserTest.php
+1
-1
lib/Drupal/views/Tests/ViewStorageTest.php
lib/Drupal/views/Tests/ViewStorageTest.php
+1
-1
lib/Drupal/views/Tests/ViewTest.php
lib/Drupal/views/Tests/ViewTest.php
+1
-1
lib/Drupal/views/Tests/ViewTestBase.php
lib/Drupal/views/Tests/ViewTestBase.php
+2
-2
lib/Drupal/views/View.php
lib/Drupal/views/View.php
+112
-117
lib/Drupal/views/ViewStorage.php
lib/Drupal/views/ViewStorage.php
+8
-8
modules/taxonomy.views.inc
modules/taxonomy.views.inc
+1
-1
plugins/export_ui/views_ui.class.php
plugins/export_ui/views_ui.class.php
+4
-4
theme/theme.inc
theme/theme.inc
+7
-7
views.module
views.module
+19
-19
views.tokens.inc
views.tokens.inc
+3
-3
views_ui.module
views_ui.module
+3
-3
No files found.
includes/admin.inc
View file @
c29f2e2d
...
...
@@ -118,17 +118,17 @@ function views_ui_preview($view, $display_id, $args = array()) {
}
}
$view
->
set
_exposed_i
nput
(
$exposed_input
);
$view
->
set
ExposedI
nput
(
$exposed_input
);
if
(
!
$view
->
set
_d
isplay
(
$display_id
))
{
if
(
!
$view
->
set
D
isplay
(
$display_id
))
{
return
t
(
'Invalid display id @display'
,
array
(
'@display'
=>
$display_id
));
}
$view
->
set
_a
rguments
(
$args
);
$view
->
set
A
rguments
(
$args
);
// Store the current view URL for later use:
if
(
$view
->
display_handler
->
get_option
(
'path'
))
{
$path
=
$view
->
get
_u
rl
();
$path
=
$view
->
get
U
rl
();
}
// Make view links come back to preview.
...
...
@@ -190,7 +190,7 @@ function views_ui_preview($view, $display_id, $args = array()) {
}
}
if
(
$show_info
)
{
$rows
[
'query'
][]
=
array
(
'<strong>'
.
t
(
'Title'
)
.
'</strong>'
,
filter_xss_admin
(
$view
->
get
_t
itle
()));
$rows
[
'query'
][]
=
array
(
'<strong>'
.
t
(
'Title'
)
.
'</strong>'
,
filter_xss_admin
(
$view
->
get
T
itle
()));
if
(
isset
(
$path
))
{
$path
=
l
(
$path
,
$path
);
}
...
...
@@ -781,7 +781,7 @@ function views_ui_taxonomy_autocomplete_validate($element, &$form_state) {
*/
function
theme_views_ui_view_info
(
$variables
)
{
$view
=
$variables
[
'view'
];
$title
=
$view
->
get
_human_n
ame
();
$title
=
$view
->
get
HumanN
ame
();
$displays
=
_views_ui_get_displays_list
(
$view
);
$displays
=
empty
(
$displays
)
?
t
(
'None'
)
:
format_plural
(
count
(
$displays
),
'Display'
,
'Displays'
)
.
': '
.
'<em>'
.
implode
(
', '
,
$displays
)
.
'</em>'
;
...
...
@@ -913,7 +913,7 @@ function views_ui_build_preview($view, $display_id, $render = TRUE) {
$build
[
'preview'
]
=
array
(
'#theme_wrappers'
=>
array
(
'container'
),
'#attributes'
=>
array
(
'id'
=>
'views-live-preview'
),
'#markup'
=>
$render
?
views_ui_preview
(
$view
->
clone
_v
iew
(),
$display_id
,
$args
)
:
''
,
'#markup'
=>
$render
?
views_ui_preview
(
$view
->
clone
V
iew
(),
$display_id
,
$args
)
:
''
,
);
return
$build
;
...
...
@@ -942,12 +942,12 @@ function views_ui_edit_form($form, &$form_state, $view, $display_id = NULL) {
$form_state
[
'no_cache'
]
=
TRUE
;
if
(
$display_id
)
{
if
(
!
$view
->
set
_d
isplay
(
$display_id
))
{
if
(
!
$view
->
set
D
isplay
(
$display_id
))
{
$form
[
'#markup'
]
=
t
(
'Invalid display id @display'
,
array
(
'@display'
=>
$display_id
));
return
$form
;
}
$view
->
fix
_missing_r
elationships
();
$view
->
fix
MissingR
elationships
();
}
$form
[
'#attached'
][
'js'
][]
=
ctools_attach_js
(
'collapsible-div'
);
...
...
@@ -1999,7 +1999,7 @@ function views_ui_import_validate($form, &$form_state) {
// Make sure base table gets set properly if it got moved.
$view
->
update
();
$view
->
init
_d
isplay
();
$view
->
init
D
isplay
();
$broken
=
FALSE
;
...
...
@@ -2026,7 +2026,7 @@ function views_ui_import_validate($form, &$form_state) {
}
}
foreach
(
View
::
views
_object_t
ypes
()
as
$type
=>
$info
)
{
foreach
(
View
::
views
ObjectT
ypes
()
as
$type
=>
$info
)
{
$handlers
=
$display
->
handler
->
get_handlers
(
$type
);
if
(
$handlers
)
{
foreach
(
$handlers
as
$id
=>
$handler
)
{
...
...
@@ -2118,7 +2118,7 @@ function views_ui_edit_view_form_submit($form, &$form_state) {
}
$form_state
[
'view'
]
->
save
();
drupal_set_message
(
t
(
'The view %name has been saved.'
,
array
(
'%name'
=>
$form_state
[
'view'
]
->
get
_human_n
ame
())));
drupal_set_message
(
t
(
'The view %name has been saved.'
,
array
(
'%name'
=>
$form_state
[
'view'
]
->
get
HumanN
ame
())));
// Remove this view from cache so we can edit it properly.
views_temp_store
()
->
delete
(
$form_state
[
'view'
]
->
name
);
...
...
@@ -2154,7 +2154,7 @@ function views_ui_edit_form_get_bucket($type, $view, $display) {
$build
=
array
(
'#theme_wrappers'
=>
array
(
'views_ui_display_tab_bucket'
),
);
$types
=
View
::
views
_object_t
ypes
();
$types
=
View
::
views
ObjectT
ypes
();
$build
[
'#overridden'
]
=
FALSE
;
$build
[
'#defaulted'
]
=
FALSE
;
...
...
@@ -2344,7 +2344,7 @@ function views_ui_edit_form_get_bucket($type, $view, $display) {
* Regenerate the current tab for AJAX updates.
*/
function
views_ui_regenerate_tab
(
&
$view
,
&
$output
,
$display_id
)
{
if
(
!
$view
->
set
_d
isplay
(
'default'
))
{
if
(
!
$view
->
set
D
isplay
(
'default'
))
{
return
;
}
...
...
@@ -3156,7 +3156,7 @@ function views_ui_edit_details_form($form, &$form_state) {
'#type'
=>
'textfield'
,
'#title'
=>
t
(
'Human-readable name'
),
'#description'
=>
t
(
'A descriptive human-readable name for this view. Spaces are allowed'
),
'#default_value'
=>
$view
->
get
_human_n
ame
(),
'#default_value'
=>
$view
->
get
HumanN
ame
(),
);
$form
[
'details'
][
'tag'
]
=
array
(
'#type'
=>
'textfield'
,
...
...
@@ -3200,7 +3200,7 @@ function views_ui_edit_display_form($form, &$form_state) {
$display_id
=
$form_state
[
'display_id'
];
$section
=
$form_state
[
'section'
];
if
(
!
$view
->
set
_d
isplay
(
$display_id
))
{
if
(
!
$view
->
set
D
isplay
(
$display_id
))
{
views_ajax_error
(
t
(
'Invalid display id @display'
,
array
(
'@display'
=>
$display_id
)));
}
$display
=
&
$view
->
display
[
$display_id
];
...
...
@@ -3276,8 +3276,8 @@ function views_ui_config_type_form($form, &$form_state) {
$display_id
=
$form_state
[
'display_id'
];
$type
=
$form_state
[
'type'
];
$types
=
View
::
views
_object_t
ypes
();
if
(
!
$view
->
set
_d
isplay
(
$display_id
))
{
$types
=
View
::
views
ObjectT
ypes
();
if
(
!
$view
->
set
D
isplay
(
$display_id
))
{
views_ajax_error
(
t
(
'Invalid display id @display'
,
array
(
'@display'
=>
$display_id
)));
}
$display
=
&
$view
->
display
[
$display_id
];
...
...
@@ -3308,7 +3308,7 @@ function views_ui_config_type_form($form, &$form_state) {
* Submit handler for type configuration form
*/
function
views_ui_config_type_form_submit
(
$form
,
&
$form_state
)
{
$types
=
View
::
views
_object_t
ypes
();
$types
=
View
::
views
ObjectT
ypes
();
$display
=
&
$form_state
[
'view'
]
->
display
[
$form_state
[
'display_id'
]];
// Store in cache
...
...
@@ -3323,8 +3323,8 @@ function views_ui_rearrange_form($form, &$form_state) {
$display_id
=
$form_state
[
'display_id'
];
$type
=
$form_state
[
'type'
];
$types
=
View
::
views
_object_t
ypes
();
if
(
!
$view
->
set
_d
isplay
(
$display_id
))
{
$types
=
View
::
views
ObjectT
ypes
();
if
(
!
$view
->
set
D
isplay
(
$display_id
))
{
views_ajax_error
(
t
(
'Invalid display id @display'
,
array
(
'@display'
=>
$display_id
)));
}
$display
=
&
$view
->
display
[
$display_id
];
...
...
@@ -3555,7 +3555,7 @@ function theme_views_ui_build_group_filter_form($variables) {
* Submit handler for rearranging form.
*/
function
views_ui_rearrange_form_submit
(
$form
,
&
$form_state
)
{
$types
=
View
::
views
_object_t
ypes
();
$types
=
View
::
views
ObjectT
ypes
();
$display
=
&
$form_state
[
'view'
]
->
display
[
$form_state
[
'display_id'
]];
$old_fields
=
$display
->
handler
->
get_option
(
$types
[
$form_state
[
'type'
]][
'plural'
]);
...
...
@@ -3591,8 +3591,8 @@ function views_ui_rearrange_filter_form($form, &$form_state) {
$display_id
=
$form_state
[
'display_id'
];
$type
=
$form_state
[
'type'
];
$types
=
View
::
views
_object_t
ypes
();
if
(
!
$view
->
set
_d
isplay
(
$display_id
))
{
$types
=
View
::
views
ObjectT
ypes
();
if
(
!
$view
->
set
D
isplay
(
$display_id
))
{
views_ajax_render
(
t
(
'Invalid display id @display'
,
array
(
'@display'
=>
$display_id
)));
}
$display
=
&
$view
->
display
[
$display_id
];
...
...
@@ -3857,7 +3857,7 @@ function theme_views_ui_rearrange_filter_form(&$vars) {
* Submit handler for rearranging form
*/
function
views_ui_rearrange_filter_form_submit
(
$form
,
&
$form_state
)
{
$types
=
View
::
views
_object_t
ypes
();
$types
=
View
::
views
ObjectT
ypes
();
$display
=
&
$form_state
[
'view'
]
->
display
[
$form_state
[
'display_id'
]];
$remember_groups
=
array
();
...
...
@@ -3975,12 +3975,12 @@ function views_ui_add_item_form($form, &$form_state) {
),
);
if
(
!
$view
->
set
_d
isplay
(
$display_id
))
{
if
(
!
$view
->
set
D
isplay
(
$display_id
))
{
views_ajax_error
(
t
(
'Invalid display id @display'
,
array
(
'@display'
=>
$display_id
)));
}
$display
=
&
$view
->
display
[
$display_id
];
$types
=
View
::
views
_object_t
ypes
();
$types
=
View
::
views
ObjectT
ypes
();
$ltitle
=
$types
[
$type
][
'ltitle'
];
$section
=
$types
[
$type
][
'plural'
];
...
...
@@ -3995,7 +3995,7 @@ function views_ui_add_item_form($form, &$form_state) {
views_ui_standard_display_dropdown
(
$form
,
$form_state
,
$section
);
// Figure out all the base tables allowed based upon what the relationships provide.
$base_tables
=
$view
->
get
_base_t
ables
();
$base_tables
=
$view
->
get
BaseT
ables
();
$options
=
views_fetch_fields
(
array_keys
(
$base_tables
),
$type
,
$display
->
handler
->
use_group_by
());
if
(
!
empty
(
$options
))
{
...
...
@@ -4096,7 +4096,7 @@ function views_ui_add_item_form($form, &$form_state) {
*/
function
views_ui_add_item_form_submit
(
$form
,
&
$form_state
)
{
$type
=
$form_state
[
'type'
];
$types
=
View
::
views
_object_t
ypes
();
$types
=
View
::
views
ObjectT
ypes
();
$section
=
$types
[
$type
][
'plural'
];
// Handle the override select.
...
...
@@ -4212,7 +4212,7 @@ function views_ui_config_item_form($form, &$form_state) {
'#attributes'
=>
array
(
'class'
=>
array
(
'scroll'
)),
),
);
if
(
!
$view
->
set
_d
isplay
(
$display_id
))
{
if
(
!
$view
->
set
D
isplay
(
$display_id
))
{
views_ajax_error
(
t
(
'Invalid display id @display'
,
array
(
'@display'
=>
$display_id
)));
}
$item
=
$view
->
get_item
(
$display_id
,
$type
,
$id
);
...
...
@@ -4223,7 +4223,7 @@ function views_ui_config_item_form($form, &$form_state) {
$form
[
'markup'
]
=
array
(
'#markup'
=>
t
(
"Error: handler for @table > @field doesn't exist!"
,
array
(
'@table'
=>
$item
[
'table'
],
'@field'
=>
$item
[
'field'
])));
}
else
{
$types
=
View
::
views
_object_t
ypes
();
$types
=
View
::
views
ObjectT
ypes
();
// If this item can come from the default display, show a dropdown
// that lets the user choose which display the changes should apply to.
...
...
@@ -4273,7 +4273,7 @@ function views_ui_config_item_form($form, &$form_state) {
// We want this relationship option to get saved even if the user
// skips submitting the form.
$view
->
set_item_option
(
$display_id
,
$type
,
$id
,
'relationship'
,
$rel
);
$temp_view
=
$view
->
clone
_v
iew
();
$temp_view
=
$view
->
clone
V
iew
();
views_ui_cache_set
(
$temp_view
);
}
...
...
@@ -4343,7 +4343,7 @@ function views_ui_config_item_form_submit_temporary($form, &$form_state) {
// Run it through the handler's submit function.
$form_state
[
'handler'
]
->
options_submit
(
$form
[
'options'
],
$form_state
);
$item
=
$form_state
[
'handler'
]
->
options
;
$types
=
View
::
views
_object_t
ypes
();
$types
=
View
::
views
ObjectT
ypes
();
// For footer/header $handler_type is area but $type is footer/header.
// For all other handle types it's the same.
...
...
@@ -4355,7 +4355,7 @@ function views_ui_config_item_form_submit_temporary($form, &$form_state) {
$override
=
NULL
;
if
(
$form_state
[
'view'
]
->
display_handler
->
use_group_by
()
&&
!
empty
(
$item
[
'group_type'
]))
{
if
(
empty
(
$form_state
[
'view'
]
->
query
))
{
$form_state
[
'view'
]
->
init
_q
uery
();
$form_state
[
'view'
]
->
init
Q
uery
();
}
$aggregate
=
$form_state
[
'view'
]
->
query
->
get_aggregation_info
();
if
(
!
empty
(
$aggregate
[
$item
[
'group_type'
]][
'handler'
][
$type
]))
{
...
...
@@ -4397,7 +4397,7 @@ function views_ui_config_item_form_submit($form, &$form_state) {
// Run it through the handler's submit function.
$form_state
[
'handler'
]
->
options_submit
(
$form
[
'options'
],
$form_state
);
$item
=
$form_state
[
'handler'
]
->
options
;
$types
=
View
::
views
_object_t
ypes
();
$types
=
View
::
views
ObjectT
ypes
();
// For footer/header $handler_type is area but $type is footer/header.
// For all other handle types it's the same.
...
...
@@ -4409,7 +4409,7 @@ function views_ui_config_item_form_submit($form, &$form_state) {
$override
=
NULL
;
if
(
$form_state
[
'view'
]
->
display_handler
->
use_group_by
()
&&
!
empty
(
$item
[
'group_type'
]))
{
if
(
empty
(
$form_state
[
'view'
]
->
query
))
{
$form_state
[
'view'
]
->
init
_q
uery
();
$form_state
[
'view'
]
->
init
Q
uery
();
}
$aggregate
=
$form_state
[
'view'
]
->
query
->
get_aggregation_info
();
if
(
!
empty
(
$aggregate
[
$item
[
'group_type'
]][
'handler'
][
$type
]))
{
...
...
@@ -4458,11 +4458,11 @@ function views_ui_config_item_group_form($type, &$form_state) {
'#attributes'
=>
array
(
'class'
=>
array
(
'scroll'
)),
),
);
if
(
!
$view
->
set
_d
isplay
(
$display_id
))
{
if
(
!
$view
->
set
D
isplay
(
$display_id
))
{
views_ajax_render
(
t
(
'Invalid display id @display'
,
array
(
'@display'
=>
$display_id
)));
}
$view
->
init
_q
uery
();
$view
->
init
Q
uery
();
$item
=
$view
->
get_item
(
$display_id
,
$type
,
$id
);
...
...
@@ -4473,7 +4473,7 @@ function views_ui_config_item_group_form($type, &$form_state) {
}
else
{
$handler
->
init
(
$view
,
$item
);
$types
=
View
::
views
_object_t
ypes
();
$types
=
View
::
views
ObjectT
ypes
();
$form
[
'#title'
]
=
t
(
'Configure group settings for @type %item'
,
array
(
'@type'
=>
$types
[
$type
][
'lstitle'
],
'%item'
=>
$handler
->
ui_name
()));
...
...
@@ -4562,7 +4562,7 @@ function views_ui_config_item_extra_form($form, &$form_state) {
'#attributes'
=>
array
(
'class'
=>
array
(
'scroll'
)),
),
);
if
(
!
$view
->
set
_d
isplay
(
$display_id
))
{
if
(
!
$view
->
set
D
isplay
(
$display_id
))
{
views_ajax_error
(
t
(
'Invalid display id @display'
,
array
(
'@display'
=>
$display_id
)));
}
$item
=
$view
->
get_item
(
$display_id
,
$type
,
$id
);
...
...
@@ -4574,7 +4574,7 @@ function views_ui_config_item_extra_form($form, &$form_state) {
}
else
{
$handler
->
init
(
$view
,
$item
);
$types
=
View
::
views
_object_t
ypes
();
$types
=
View
::
views
ObjectT
ypes
();
$form
[
'#title'
]
=
t
(
'Configure extra settings for @type %item'
,
array
(
'@type'
=>
$types
[
$type
][
'lstitle'
],
'%item'
=>
$handler
->
ui_name
()));
...
...
@@ -4633,7 +4633,7 @@ function views_ui_config_style_form($form, &$form_state) {
'#attributes'
=>
array
(
'class'
=>
array
(
'scroll'
)),
),
);
if
(
!
$view
->
set
_d
isplay
(
$display_id
))
{
if
(
!
$view
->
set
D
isplay
(
$display_id
))
{
views_ajax_error
(
t
(
'Invalid display id @display'
,
array
(
'@display'
=>
$display_id
)));
}
$item
=
$view
->
get_item
(
$display_id
,
$type
,
$id
);
...
...
@@ -4645,7 +4645,7 @@ function views_ui_config_style_form($form, &$form_state) {
}
else
{
$handler
->
init
(
$view
,
$item
);
$types
=
View
::
views
_object_t
ypes
();
$types
=
View
::
views
ObjectT
ypes
();
$form
[
'#title'
]
=
t
(
'Configure summary style for @type %item'
,
array
(
'@type'
=>
$types
[
$type
][
'lstitle'
],
'%item'
=>
$handler
->
ui_name
()));
...
...
@@ -5311,7 +5311,7 @@ function views_ui_add_template_page() {
$rows
=
array
();
foreach
(
$templates
as
$name
=>
$template
)
{
$rows
[]
=
array
(
array
(
'data'
=>
check_plain
(
$template
->
get
_human_n
ame
())),
array
(
'data'
=>
check_plain
(
$template
->
get
HumanN
ame
())),
array
(
'data'
=>
check_plain
(
$template
->
description
)),
array
(
'data'
=>
l
(
'add'
,
'admin/structure/views/template/'
.
$template
->
name
.
'/add'
)),
);
...
...
@@ -5370,8 +5370,8 @@ function views_ui_field_list() {
$fields
=
array
();
foreach
(
$views
as
$view
)
{
foreach
(
$view
->
display
as
$display_id
=>
$display
)
{
if
(
$view
->
set
_d
isplay
(
$display_id
))
{
foreach
(
View
::
views
_object_t
ypes
()
as
$type
=>
$info
)
{
if
(
$view
->
set
D
isplay
(
$display_id
))
{
foreach
(
View
::
views
ObjectT
ypes
()
as
$type
=>
$info
)
{
foreach
(
$view
->
get_items
(
$type
,
$display_id
)
as
$item
)
{
$data
=
views_fetch_data
(
$item
[
'table'
]);
if
(
isset
(
$data
[
$item
[
'field'
]])
&&
isset
(
$data
[
$item
[
'field'
]][
$type
])
...
...
lib/Drupal/views/Analyzer.php
View file @
c29f2e2d
...
...
@@ -66,7 +66,7 @@ public function setView(View $view = NULL) {
* 'warning' and 'error'.
*/
public
function
getMessages
()
{
$this
->
view
->
init
_d
isplay
();
$this
->
view
->
init
D
isplay
();
$messages
=
module_invoke_all
(
'views_analyze'
,
$this
->
view
);
return
$messages
;
...
...
lib/Drupal/views/Plugin/views/HandlerBase.php
View file @
c29f2e2d
...
...
@@ -94,7 +94,7 @@ function init(&$view, &$options) {
$options
[
'field'
]
=
$this
->
actual_field
;
}
$types
=
View
::
views
_object_t
ypes
();
$types
=
View
::
views
ObjectT
ypes
();
$plural
=
$this
->
plugin_type
;
if
(
isset
(
$types
[
$this
->
plugin_type
][
'plural'
]))
{
$plural
=
$types
[
$this
->
plugin_type
][
'plural'
];
...
...
@@ -179,7 +179,7 @@ function get_field($field = NULL) {
// If grouping, check to see if the aggregation method needs to modify the field.
if
(
$this
->
view
->
display_handler
->
use_group_by
())
{
$this
->
view
->
init
_q
uery
();
$this
->
view
->
init
Q
uery
();
if
(
$this
->
query
)
{
$info
=
$this
->
query
->
get_aggregation_info
();
if
(
!
empty
(
$info
[
$this
->
options
[
'group_type'
]][
'method'
]))
{
...
...
@@ -314,7 +314,7 @@ function use_group_by() {
function
groupby_form
(
&
$form
,
&
$form_state
)
{
$view
=
&
$form_state
[
'view'
];
$display_id
=
$form_state
[
'display_id'
];
$types
=
View
::
views
_object_t
ypes
();
$types
=
View
::
views
ObjectT
ypes
();
$type
=
$form_state
[
'type'
];
$id
=
$form_state
[
'id'
];
...
...
@@ -323,7 +323,7 @@ function groupby_form(&$form, &$form_state) {
$form
[
'#section'
]
=
$display_id
.
'-'
.
$type
.
'-'
.
$id
;
$view
->
init
_q
uery
();
$view
->
init
Q
uery
();
$info
=
$view
->
query
->
get_aggregation_info
();
foreach
(
$info
as
$id
=>
$aggregate
)
{
$group_types
[
$id
]
=
$aggregate
[
'title'
];
...
...
lib/Drupal/views/Plugin/views/PluginBase.php
View file @
c29f2e2d
...
...
@@ -131,7 +131,7 @@ function unpack_options(&$storage, $options, $definition = NULL, $all = TRUE, $c
if
(
!
empty
(
$this
->
view
))
{
// Ensure we have a localization plugin.
$this
->
view
->
init
_l
ocalization
();
$this
->
view
->
init
L
ocalization
();
// Set up default localization keys. Handlers and such set this for us
if
(
empty
(
$localization_keys
)
&&
isset
(
$this
->
localization_keys
))
{
...
...
@@ -170,7 +170,7 @@ function unpack_options(&$storage, $options, $definition = NULL, $all = TRUE, $c
// Don't localize strings during editing. When editing, we need to work with
// the original data, not the translated version.
else
if
(
empty
(
$this
->
view
->
editing
)
&&
!
empty
(
$definition
[
$key
][
'translatable'
])
&&
!
empty
(
$value
)
||
!
empty
(
$definition
[
'contains'
][
$key
][
'translatable'
])
&&
!
empty
(
$value
))
{
if
(
!
empty
(
$this
->
view
)
&&
$this
->
view
->
is
_t
ranslatable
())
{
if
(
!
empty
(
$this
->
view
)
&&
$this
->
view
->
is
T
ranslatable
())
{
// Allow other modules to make changes to the string before it's
// sent for translation.
// The $keys array is built from the view name, any localization keys
...
...
lib/Drupal/views/Plugin/views/area/Result.php
View file @
c29f2e2d
...
...
@@ -67,8 +67,8 @@ function render($empty = FALSE) {
$output
=
''
;
$format
=
$this
->
options
[
'content'
];
// Calculate the page totals.
$current_page
=
(
int
)
$this
->
view
->
get
_current_p
age
()
+
1
;
$per_page
=
(
int
)
$this
->
view
->
get
_items_per_p
age
();
$current_page
=
(
int
)
$this
->
view
->
get
CurrentP
age
()
+
1
;
$per_page
=
(
int
)
$this
->
view
->
get
ItemsPerP
age
();
$count
=
count
(
$this
->
view
->
result
);
// @TODO: Maybe use a possible is views empty functionality.
// Not every view has total_rows set, use view->result instead.
...
...
lib/Drupal/views/Plugin/views/area/View.php
View file @
c29f2e2d
...
...
@@ -66,7 +66,7 @@ function render($empty = FALSE) {
if
(
empty
(
$view
)
||
!
$view
->
access
(
$display_id
))
{
return
;
}
$view
->
set
_d
isplay
(
$display_id
);
$view
->
set
D
isplay
(
$display_id
);
// Avoid recursion
$view
->
parent_views
+=
$this
->
view
->
parent_views
;
...
...
lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
View file @
c29f2e2d
...
...
@@ -877,7 +877,7 @@ function summary_sort($order, $by = NULL) {
/**
* Provide the argument to use to link from the summary to the next level;
* this will be called once per row of a summary, and used as part of
* $view->get
_u
rl().
* $view->get
U
rl().
*
* @param $data
* The query results for the row.
...
...
lib/Drupal/views/Plugin/views/cache/CachePluginBase.php
View file @
c29f2e2d
...
...
@@ -116,7 +116,7 @@ function cache_set($type) {
$data
=
array
(
'result'
=>
$this
->
view
->
result
,
'total_rows'
=>
isset
(
$this
->
view
->
total_rows
)
?
$this
->
view
->
total_rows
:
0
,
'current_page'
=>
$this
->
view
->
get
_current_p
age
(),
'current_page'
=>
$this
->
view
->
get
CurrentP
age
(),
);
cache
(
$this
->
table
)
->
set
(
$this
->
get_results_key
(),
$data
,
$this
->
cache_set_expire
(
$type
));
break
;
...
...
@@ -147,7 +147,7 @@ function cache_get($type) {
if
(
!
$cutoff
||
$cache
->
created
>
$cutoff
)
{
$this
->
view
->
result
=
$cache
->
data
[
'result'
];
$this
->
view
->
total_rows
=
$cache
->
data
[
'total_rows'
];
$this
->
view
->
set
_current_p
age
(
$cache
->
data
[
'current_page'
]);
$this
->
view
->
set
CurrentP
age
(
$cache
->
data
[
'current_page'
]);
$this
->
view
->
execute_time
=
0
;
return
TRUE
;
}
...
...
lib/Drupal/views/Plugin/views/display/Attachment.php
View file @
c29f2e2d
...
...
@@ -243,18 +243,18 @@ function attach_to($display_id) {
// Get a fresh view because our current one has a lot of stuff on it because it's
// already been executed.
$view
=
$this
->
view
->
clone
_v
iew
();
$view
=
$this
->
view
->
clone
V
iew
();
$view
->
original_args
=
$view
->
args
;
$args
=
$this
->
get_option
(
'inherit_arguments'
)
?
$this
->
view
->
args
:
array
();
$view
->
set
_a
rguments
(
$args
);
$view
->
set
_d
isplay
(
$this
->
display
->
id
);
$view
->
set
A
rguments
(
$args
);
$view
->
set
D
isplay
(
$this
->
display
->
id
);
if
(
$this
->
get_option
(
'inherit_pager'
))
{
$view
->
display_handler
->
usesPager
=
$this
->
view
->
display
[
$display_id
]
->
handler
->
usesPager
();
$view
->
display_handler
->
set_option
(
'pager'
,
$this
->
view
->
display
[
$display_id
]
->
handler
->
get_option
(
'pager'
));
}
$attachment
=
$view
->
execute
_d
isplay
(
$this
->
display
->
id
,
$args
);
$attachment
=
$view
->
execute
D
isplay
(
$this
->
display
->
id
,
$args
);
switch
(
$this
->
get_option
(
'attachment_position'
))
{
case
'before'
:
...
...
lib/Drupal/views/Plugin/views/display/Block.php
View file @
c29f2e2d
...
...
@@ -54,10 +54,10 @@ function execute_hook_block_list($delta = 0, $edit = array()) {
if
(
empty
(
$desc
))
{
if
(
$this
->
display
->
display_title
==
$this
->
definition
[
'title'
])
{
$desc
=
t
(
'View: !view'
,
array
(
'!view'
=>
$this
->
view
->
get
_human_n
ame
()));
$desc
=
t
(
'View: !view'
,
array
(
'!view'
=>
$this
->
view
->
get
HumanN
ame
()));
}
else
{
$desc
=
t
(
'View: !view: !display'
,
array
(
'!view'
=>
$this
->
view
->
get
_human_n
ame
(),
'!display'
=>
$this
->
display
->
display_title
));
$desc
=
t
(
'View: !view: !display'
,
array
(
'!view'
=>
$this
->
view
->
get
HumanN
ame
(),
'!display'
=>
$this
->
display
->
display_title
));
}
}
return
array
(
...
...
@@ -75,7 +75,7 @@ function execute() {
// Prior to this being called, the $view should already be set to this
// display, and arguments should be set on the view.
$info
[
'content'
]
=
$this
->
view
->
render
();
$info
[
'subject'
]
=
filter_xss_admin
(
$this
->
view
->
get
_t
itle
());
$info
[
'subject'
]
=
filter_xss_admin
(
$this
->
view
->
get
T
itle
());
if
(
!
empty
(
$this
->
view
->
result
)
||
$this
->
get_option
(
'empty'
)
||
!
empty
(
$this
->
view
->
style_plugin
->
definition
[
'even empty'
]))
{
return
$info
;
}
...
...
@@ -171,7 +171,7 @@ function options_form(&$form, &$form_state) {
);
break
;
case
'exposed_form_options'
:
$this
->
view
->
init
_h
andlers
();
$this
->
view
->
init
H
andlers
();
if
(
!
$this
->
uses_exposed
()
&&
parent
::
uses_exposed
())
{
$form
[
'exposed_form_options'
][
'warning'
]
=
array
(
'#weight'
=>
-
10
,
...
...
lib/Drupal/views/Plugin/views/display/DefaultDisplay.php
View file @
c29f2e2d
...
...
@@ -43,14 +43,14 @@ function is_default_display() { return TRUE; }
*
* For the simplest use:
* @code
* $output = $view->execute
_d
isplay('default', $args);
* $output = $view->execute
D
isplay('default', $args);
* @endcode
*
* For more complex usages, a view can be partially built:
* @code
* $view->set
_a
rguments($args);
* $view->set
A
rguments($args);
* $view->build('default'); // Build the query
* $view->pre
_e
xecute(); // Pre-execute the query.
* $view->pre
E
xecute(); // Pre-execute the query.
* $view->execute(); // Run the query
* $output = $view->render(); // Render the view
* @endcode
...
...
@@ -61,7 +61,7 @@ function is_default_display() { return TRUE; }
*
* You can also do:
* @code
* $view->set
_a
rguments($args);
* $view->set
A
rguments($args);
* $output = $view->render('default'); // Render the view
* @endcode
*
...
...
lib/Drupal/views/Plugin/views/display/DisplayPluginBase.php
View file @
c29f2e2d
...
...
@@ -722,7 +722,7 @@ function get_path() {
}
function
get_url
()
{
return
$this
->
view
->
get
_u
rl
();
return
$this
->
view
->
get
U
rl
();
}
/**
...
...
@@ -866,7 +866,7 @@ function &get_handler($type, $id) {
function
get_handlers
(
$type
)
{
if
(
!
isset
(
$this
->
handlers
[
$type
]))
{
$this
->
handlers
[
$type
]
=
array
();
$types
=
View
::
views
_object_t
ypes
();
$types
=
View
::
views
ObjectT
ypes
();
$plural
=
$types
[
$type
][
'plural'
];
foreach
(
$this
->
get_option
(
$plural
)
as
$id
=>
$info
)
{
...
...
@@ -887,7 +887,7 @@ function get_handlers($type) {
$override
=
NULL
;
if
(
$this
->
use_group_by
()
&&
!
empty
(
$info
[
'group_type'
]))
{
if
(
empty
(
$this
->
view
->
query
))
{
$this
->
view
->
init
_q
uery
();
$this
->
view
->
init
Q
uery
();
}
$aggregate
=
$this
->
view
->
query
->
get_aggregation_info
();
if
(
!
empty
(
$aggregate
[
$info
[
'group_type'
]][
'handler'
][
$type
]))
{
...
...
@@ -1214,7 +1214,7 @@ function options_summary(&$categories, &$options) {
);
}
$this
->
view
->
init
_q
uery
();
$this
->
view
->
init
Q
uery
();
if
(
$this
->
view
->
query
->
get_aggregation_info
())
{
$options
[
'group_by'
]
=
array
(
'category'
=>
'other'
,
...
...
@@ -1577,7 +1577,7 @@ function options_form(&$form, &$form_state) {
$plugin_name
=
$query_options
[
'type'
];
$form
[
'#title'
]
.
=
t
(
'Query options'
);
$this
->
view
->
init
_q
uery
();
$this
->
view
->
init
Q
uery
();
if
(
$this
->
view
->
query
)
{
$form
[
'query'
]
=
array
(
'#tree'
=>
TRUE
,
...
...
@@ -2478,7 +2478,7 @@ function render_more_link() {
if
(
$path
)
{
if
(
empty
(
$override_path
))
{
$path
=
$this
->