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
2daec13e
Commit
2daec13e
authored
Sep 23, 2012
by
tim.plunkett
Committed by
tim.plunkett
Oct 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#1792454
by tim.plunkett: Add type hinting to function signatures for $view.
parent
28bdcca2
Changes
48
Hide whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
110 additions
and
83 deletions
+110
-83
includes/admin.inc
includes/admin.inc
+10
-10
lib/Drupal/views/Plugin/views/HandlerBase.php
lib/Drupal/views/Plugin/views/HandlerBase.php
+1
-1
lib/Drupal/views/Plugin/views/access/AccessPluginBase.php
lib/Drupal/views/Plugin/views/access/AccessPluginBase.php
+2
-1
lib/Drupal/views/Plugin/views/area/AreaPluginBase.php
lib/Drupal/views/Plugin/views/area/AreaPluginBase.php
+2
-1
lib/Drupal/views/Plugin/views/argument/ManyToOne.php
lib/Drupal/views/Plugin/views/argument/ManyToOne.php
+2
-1
lib/Drupal/views/Plugin/views/argument/String.php
lib/Drupal/views/Plugin/views/argument/String.php
+2
-1
lib/Drupal/views/Plugin/views/argument_default/ArgumentDefaultPluginBase.php
...ugin/views/argument_default/ArgumentDefaultPluginBase.php
+2
-1
lib/Drupal/views/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php
.../views/argument_validator/ArgumentValidatorPluginBase.php
+2
-1
lib/Drupal/views/Plugin/views/cache/CachePluginBase.php
lib/Drupal/views/Plugin/views/cache/CachePluginBase.php
+2
-1
lib/Drupal/views/Plugin/views/display_extender/DisplayExtenderPluginBase.php
...ugin/views/display_extender/DisplayExtenderPluginBase.php
+2
-1
lib/Drupal/views/Plugin/views/exposed_form/ExposedFormPluginBase.php
...views/Plugin/views/exposed_form/ExposedFormPluginBase.php
+2
-1
lib/Drupal/views/Plugin/views/field/Boolean.php
lib/Drupal/views/Plugin/views/field/Boolean.php
+3
-1
lib/Drupal/views/Plugin/views/field/Markup.php
lib/Drupal/views/Plugin/views/field/Markup.php
+2
-1
lib/Drupal/views/Plugin/views/filter/Broken.php
lib/Drupal/views/Plugin/views/filter/Broken.php
+2
-1
lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php
lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php
+2
-1
lib/Drupal/views/Plugin/views/filter/ManyToOne.php
lib/Drupal/views/Plugin/views/filter/ManyToOne.php
+2
-1
lib/Drupal/views/Plugin/views/pager/None.php
lib/Drupal/views/Plugin/views/pager/None.php
+2
-1
lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php
lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php
+2
-1
lib/Drupal/views/Plugin/views/query/QueryPluginBase.php
lib/Drupal/views/Plugin/views/query/QueryPluginBase.php
+5
-4
lib/Drupal/views/Plugin/views/query/Sql.php
lib/Drupal/views/Plugin/views/query/Sql.php
+5
-4
lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php
lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php
+0
-1
lib/Drupal/views/Plugin/views/relationship/RelationshipPluginBase.php
...iews/Plugin/views/relationship/RelationshipPluginBase.php
+2
-1
lib/Drupal/views/Plugin/views/row/RowPluginBase.php
lib/Drupal/views/Plugin/views/row/RowPluginBase.php
+2
-1
lib/Drupal/views/Plugin/views/sort/GroupByNumeric.php
lib/Drupal/views/Plugin/views/sort/GroupByNumeric.php
+2
-1
lib/Drupal/views/Plugin/views/style/StylePluginBase.php
lib/Drupal/views/Plugin/views/style/StylePluginBase.php
+2
-1
lib/Views/comment/Plugin/views/field/Comment.php
lib/Views/comment/Plugin/views/field/Comment.php
+2
-1
lib/Views/comment/Plugin/views/field/Username.php
lib/Views/comment/Plugin/views/field/Username.php
+2
-1
lib/Views/field/Plugin/views/argument/FieldList.php
lib/Views/field/Plugin/views/argument/FieldList.php
+2
-1
lib/Views/field/Plugin/views/argument/ListString.php
lib/Views/field/Plugin/views/argument/ListString.php
+2
-1
lib/Views/field/Plugin/views/field/Field.php
lib/Views/field/Plugin/views/field/Field.php
+2
-1
lib/Views/field/Plugin/views/relationship/EntityReverse.php
lib/Views/field/Plugin/views/relationship/EntityReverse.php
+2
-1
lib/Views/file/Plugin/views/field/File.php
lib/Views/file/Plugin/views/field/File.php
+2
-1
lib/Views/node/Plugin/views/field/HistoryUserTimestamp.php
lib/Views/node/Plugin/views/field/HistoryUserTimestamp.php
+2
-1
lib/Views/node/Plugin/views/field/Node.php
lib/Views/node/Plugin/views/field/Node.php
+2
-1
lib/Views/node/Plugin/views/field/Revision.php
lib/Views/node/Plugin/views/field/Revision.php
+2
-1
lib/Views/node/Plugin/views/row/View.php
lib/Views/node/Plugin/views/row/View.php
+2
-1
lib/Views/statistics/Plugin/views/field/AccesslogPath.php
lib/Views/statistics/Plugin/views/field/AccesslogPath.php
+2
-1
lib/Views/taxonomy/Plugin/views/argument_default/Tid.php
lib/Views/taxonomy/Plugin/views/argument_default/Tid.php
+2
-1
lib/Views/taxonomy/Plugin/views/argument_validator/Term.php
lib/Views/taxonomy/Plugin/views/argument_validator/Term.php
+2
-1
lib/Views/taxonomy/Plugin/views/field/TaxonomyIndexTid.php
lib/Views/taxonomy/Plugin/views/field/TaxonomyIndexTid.php
+2
-1
lib/Views/taxonomy/Plugin/views/filter/TaxonomyIndexTid.php
lib/Views/taxonomy/Plugin/views/filter/TaxonomyIndexTid.php
+2
-1
lib/Views/taxonomy/Plugin/views/relationship/NodeTermData.php
...Views/taxonomy/Plugin/views/relationship/NodeTermData.php
+2
-1
lib/Views/user/Plugin/views/field/Name.php
lib/Views/user/Plugin/views/field/Name.php
+2
-1
lib/Views/user/Plugin/views/field/User.php
lib/Views/user/Plugin/views/field/User.php
+2
-1
tests/views_test_data/views_test_data.module
tests/views_test_data/views_test_data.module
+2
-2
theme/theme.inc
theme/theme.inc
+2
-1
views.module
views.module
+5
-20
views_ui.module
views_ui.module
+1
-1
No files found.
includes/admin.inc
View file @
2daec13e
...
...
@@ -793,7 +793,7 @@ function theme_views_ui_view_info($variables) {
/**
* Page to delete a view.
*/
function
views_ui_break_lock_confirm
(
$form
,
&
$form_state
,
$view
)
{
function
views_ui_break_lock_confirm
(
$form
,
&
$form_state
,
ViewExecutable
$view
)
{
$form_state
[
'view'
]
=
&
$view
;
$form
=
array
();
...
...
@@ -912,7 +912,7 @@ function views_ui_build_preview($view, $display_id, $render = TRUE) {
*
* @see views_ui_ajax_get_form()
*/
function
views_ui_edit_form
(
$form
,
&
$form_state
,
$view
,
$display_id
=
NULL
)
{
function
views_ui_edit_form
(
$form
,
&
$form_state
,
ViewExecutable
$view
,
$display_id
=
NULL
)
{
// Do not allow the form to be cached, because $form_state['view'] can become
// stale between page requests.
// See views_ui_ajax_get_form() for how this affects #ajax.
...
...
@@ -1097,7 +1097,7 @@ function views_ui_edit_form($form, &$form_state, $view, $display_id = NULL) {
/**
* Provide the preview formulas and the preview output, too.
*/
function
views_ui_preview_form
(
$form
,
&
$form_state
,
$view
,
$display_id
=
'default'
)
{
function
views_ui_preview_form
(
$form
,
&
$form_state
,
ViewExecutable
$view
,
$display_id
=
'default'
)
{
$form_state
[
'no_cache'
]
=
TRUE
;
$form_state
[
'view'
]
=
$view
;
...
...
@@ -1672,7 +1672,7 @@ function views_ui_get_display_tab_details($view, $display) {
* This function might be more logical as a method on an object, if a suitable
* object emerges out of refactoring.
*/
function
views_ui_edit_form_get_build_from_option
(
$id
,
$option
,
$view
,
$display
)
{
function
views_ui_edit_form_get_build_from_option
(
$id
,
$option
,
ViewExecutable
$view
,
$display
)
{
$option_build
=
array
();
$option_build
[
'#theme'
]
=
'views_ui_display_tab_setting'
;
...
...
@@ -2100,7 +2100,7 @@ function views_ui_edit_view_form_delete($form, &$form_state) {
/**
* Add information about a section to a display.
*/
function
views_ui_edit_form_get_bucket
(
$type
,
$view
,
$display
)
{
function
views_ui_edit_form_get_bucket
(
$type
,
ViewExecutable
$view
,
$display
)
{
$build
=
array
(
'#theme_wrappers'
=>
array
(
'views_ui_display_tab_bucket'
),
);
...
...
@@ -2285,7 +2285,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
)
{
function
views_ui_regenerate_tab
(
ViewExecutable
$view
,
&
$output
,
$display_id
)
{
if
(
!
$view
->
setDisplay
(
'default'
))
{
return
;
}
...
...
@@ -2674,7 +2674,7 @@ function views_ui_ajax_forms($key = NULL) {
* is the same as another. Since the arguments differ slightly
* we do a lot of spiffy concatenation here.
*/
function
views_ui_build_identifier
(
$key
,
$view
,
$display_id
,
$args
)
{
function
views_ui_build_identifier
(
$key
,
ViewExecutable
$view
,
$display_id
,
$args
)
{
$form
=
views_ui_ajax_forms
(
$key
);
// Automatically remove the single-form cache if it exists and
// does not match the key.
...
...
@@ -2691,7 +2691,7 @@ function views_ui_build_identifier($key, $view, $display_id, $args) {
* Build up a $form_state object suitable for use with drupal_build_form
* based on known information about a form.
*/
function
views_ui_build_form_state
(
$js
,
$key
,
&
$view
,
$display_id
,
$args
)
{
function
views_ui_build_form_state
(
$js
,
$key
,
ViewExecutable
$view
,
$display_id
,
$args
)
{
$form
=
views_ui_ajax_forms
(
$key
);
// Build up form state
$form_state
=
array
(
...
...
@@ -2729,7 +2729,7 @@ function views_ui_build_form_url($form_state) {
* Add another form to the stack; clicking 'apply' will go to this form
* rather than closing the ajax popup.
*/
function
views_ui_add_form_to_stack
(
$key
,
&
$view
,
$display_id
,
$args
,
$top
=
FALSE
,
$rebuild_keys
=
FALSE
)
{
function
views_ui_add_form_to_stack
(
$key
,
ViewExecutable
$view
,
$display_id
,
$args
,
$top
=
FALSE
,
$rebuild_keys
=
FALSE
)
{
if
(
empty
(
$view
->
stack
))
{
$view
->
stack
=
array
();
}
...
...
@@ -2773,7 +2773,7 @@ function views_ui_add_form_to_stack($key, &$view, $display_id, $args, $top = FAL
* We do this for consistency and to make it easy to chain forms
* together.
*/
function
views_ui_ajax_form
(
$js
,
$key
,
$view
,
$display_id
=
''
)
{
function
views_ui_ajax_form
(
$js
,
$key
,
ViewExecutable
$view
,
$display_id
=
''
)
{
$form
=
views_ui_ajax_forms
(
$key
);
if
(
empty
(
$form
))
{
return
MENU_NOT_FOUND
;
...
...
lib/Drupal/views/Plugin/views/HandlerBase.php
View file @
2daec13e
...
...
@@ -87,7 +87,7 @@ public function __construct(array $configuration, $plugin_id, DiscoveryInterface
* The item from the database; the actual contents of this will vary
* based upon the type of handler.
*/
public
function
init
(
&
$view
,
&
$options
)
{
public
function
init
(
ViewExecutable
$view
,
&
$options
)
{
$this
->
setOptionDefaults
(
$this
->
options
,
$this
->
defineOptions
());
$this
->
view
=
&
$view
;
$display_id
=
$this
->
view
->
current_display
;
...
...
lib/Drupal/views/Plugin/views/access/AccessPluginBase.php
View file @
2daec13e
...
...
@@ -8,6 +8,7 @@
namespace
Drupal\views\Plugin\views\access
;
use
Drupal\views\Plugin\views\PluginBase
;
use
Drupal\views\ViewExecutable
;
/**
* @defgroup views_access_plugins Views access plugins
...
...
@@ -33,7 +34,7 @@ abstract class AccessPluginBase extends PluginBase {
* @param $display
* The display handler.
*/
public
function
init
(
&
$view
,
&
$display
)
{
public
function
init
(
ViewExecutable
$view
,
&
$display
)
{
$this
->
setOptionDefaults
(
$this
->
options
,
$this
->
defineOptions
());
$this
->
view
=
&
$view
;
$this
->
displayHandler
=
&
$display
;
...
...
lib/Drupal/views/Plugin/views/area/AreaPluginBase.php
View file @
2daec13e
...
...
@@ -7,6 +7,7 @@
namespace
Drupal\views\Plugin\views\area
;
use
Drupal\views\ViewExecutable
;
use
Drupal\views\Plugin\views\PluginBase
;
use
Drupal\views\Plugin\views\HandlerBase
;
...
...
@@ -30,7 +31,7 @@ abstract class AreaPluginBase extends HandlerBase {
* Make sure that no result area handlers are set to be shown when the result
* is empty.
*/
public
function
init
(
&
$view
,
&
$options
)
{
public
function
init
(
ViewExecutable
$view
,
&
$options
)
{
$this
->
setOptionDefaults
(
$this
->
options
,
$this
->
defineOptions
());
parent
::
init
(
$view
,
$options
);
if
(
$this
->
definition
[
'plugin_type'
]
==
'empty'
)
{
...
...
lib/Drupal/views/Plugin/views/argument/ManyToOne.php
View file @
2daec13e
...
...
@@ -7,6 +7,7 @@
namespace
Drupal\views\Plugin\views\argument
;
use
Drupal\views\ViewExecutable
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\views\ManyToOneHelper
;
...
...
@@ -29,7 +30,7 @@
*/
class
ManyToOne
extends
ArgumentPluginBase
{
public
function
init
(
&
$view
,
&
$options
)
{
public
function
init
(
ViewExecutable
$view
,
&
$options
)
{
parent
::
init
(
$view
,
$options
);
$this
->
helper
=
new
ManyToOneHelper
(
$this
);
...
...
lib/Drupal/views/Plugin/views/argument/String.php
View file @
2daec13e
...
...
@@ -7,6 +7,7 @@
namespace
Drupal\views\Plugin\views\argument
;
use
Drupal\views\ViewExecutable
;
use
Drupal\views\ManyToOneHelper
;
use
Drupal\Core\Annotation\Plugin
;
...
...
@@ -22,7 +23,7 @@
*/
class
String
extends
ArgumentPluginBase
{
public
function
init
(
&
$view
,
&
$options
)
{
public
function
init
(
ViewExecutable
$view
,
&
$options
)
{
parent
::
init
(
$view
,
$options
);
if
(
!
empty
(
$this
->
definition
[
'many to one'
]))
{
$this
->
helper
=
new
ManyToOneHelper
(
$this
);
...
...
lib/Drupal/views/Plugin/views/argument_default/ArgumentDefaultPluginBase.php
View file @
2daec13e
...
...
@@ -7,6 +7,7 @@
namespace
Drupal\views\Plugin\views\argument_default
;
use
Drupal\views\ViewExecutable
;
use
Drupal\views\Plugin\views\PluginBase
;
/**
...
...
@@ -33,7 +34,7 @@ function get_argument() { }
* Initialize this plugin with the view and the argument
* it is linked to.
*/
public
function
init
(
&
$view
,
&
$argument
,
$options
)
{
public
function
init
(
ViewExecutable
$view
,
&
$argument
,
$options
)
{
$this
->
setOptionDefaults
(
$this
->
options
,
$this
->
defineOptions
());
$this
->
view
=
&
$view
;
$this
->
argument
=
&
$argument
;
...
...
lib/Drupal/views/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php
View file @
2daec13e
...
...
@@ -7,6 +7,7 @@
namespace
Drupal\views\Plugin\views\argument_validator
;
use
Drupal\views\ViewExecutable
;
use
Drupal\views\Plugin\views\PluginBase
;
/**
...
...
@@ -26,7 +27,7 @@ abstract class ArgumentValidatorPluginBase extends PluginBase {
* Initialize this plugin with the view and the argument
* it is linked to.
*/
public
function
init
(
&
$view
,
&
$argument
,
$options
)
{
public
function
init
(
ViewExecutable
$view
,
&
$argument
,
$options
)
{
$this
->
setOptionDefaults
(
$this
->
options
,
$this
->
defineOptions
());
$this
->
view
=
&
$view
;
$this
->
argument
=
&
$argument
;
...
...
lib/Drupal/views/Plugin/views/cache/CachePluginBase.php
View file @
2daec13e
...
...
@@ -7,6 +7,7 @@
namespace
Drupal\views\Plugin\views\cache
;
use
Drupal\views\ViewExecutable
;
use
Drupal\views\Plugin\views\PluginBase
;
use
Drupal\Core\Database\Query\Select
;
...
...
@@ -62,7 +63,7 @@ abstract class CachePluginBase extends PluginBase {
* @param $display
* The display handler.
*/
public
function
init
(
&
$view
,
&
$display
)
{
public
function
init
(
ViewExecutable
$view
,
&
$display
)
{
$this
->
setOptionDefaults
(
$this
->
options
,
$this
->
defineOptions
());
$this
->
view
=
&
$view
;
$this
->
displayHandler
=
&
$display
;
...
...
lib/Drupal/views/Plugin/views/display_extender/DisplayExtenderPluginBase.php
View file @
2daec13e
...
...
@@ -7,6 +7,7 @@
namespace
Drupal\views\Plugin\views\display_extender
;
use
Drupal\views\ViewExecutable
;
use
Drupal\views\Plugin\views\PluginBase
;
use
Drupal\Core\Annotation\Translation
;
...
...
@@ -17,7 +18,7 @@
*/
abstract
class
DisplayExtenderPluginBase
extends
PluginBase
{
public
function
init
(
&
$view
,
&
$display
)
{
public
function
init
(
ViewExecutable
$view
,
&
$display
)
{
$this
->
setOptionDefaults
(
$this
->
options
,
$this
->
defineOptions
());
$this
->
view
=
$view
;
$this
->
display
=
$display
;
...
...
lib/Drupal/views/Plugin/views/exposed_form/ExposedFormPluginBase.php
View file @
2daec13e
...
...
@@ -7,6 +7,7 @@
namespace
Drupal\views\Plugin\views\exposed_form
;
use
Drupal\views\ViewExecutable
;
use
Drupal\views\Plugin\views\PluginBase
;
/**
...
...
@@ -37,7 +38,7 @@ abstract class ExposedFormPluginBase extends PluginBase {
* @param $display
* The display handler.
*/
public
function
init
(
&
$view
,
&
$display
,
$options
=
array
())
{
public
function
init
(
ViewExecutable
$view
,
&
$display
,
$options
=
array
())
{
$this
->
setOptionDefaults
(
$this
->
options
,
$this
->
defineOptions
());
$this
->
view
=
&
$view
;
$this
->
displayHandler
=
&
$display
;
...
...
lib/Drupal/views/Plugin/views/field/Boolean.php
View file @
2daec13e
...
...
@@ -6,6 +6,8 @@
*/
namespace
Drupal\views\Plugin\views\field
;
use
Drupal\views\ViewExecutable
;
use
Drupal\Core\Annotation\Plugin
;
/**
...
...
@@ -38,7 +40,7 @@ protected function defineOptions() {
return
$options
;
}
public
function
init
(
&
$view
,
&
$options
)
{
public
function
init
(
ViewExecutable
$view
,
&
$options
)
{
parent
::
init
(
$view
,
$options
);
$default_formats
=
array
(
...
...
lib/Drupal/views/Plugin/views/field/Markup.php
View file @
2daec13e
...
...
@@ -8,6 +8,7 @@
namespace
Drupal\views\Plugin\views\field
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\views\ViewExecutable
;
/**
* A handler to run a field through check_markup, using a companion
...
...
@@ -26,7 +27,7 @@
*/
class
Markup
extends
FieldPluginBase
{
public
function
init
(
&
$view
,
&
$options
)
{
public
function
init
(
ViewExecutable
$view
,
&
$options
)
{
parent
::
init
(
$view
,
$options
);
$this
->
format
=
$this
->
definition
[
'format'
];
...
...
lib/Drupal/views/Plugin/views/filter/Broken.php
View file @
2daec13e
...
...
@@ -8,6 +8,7 @@
namespace
Drupal\views\Plugin\views\filter
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\views\ViewExecutable
;
/**
* A special handler to take the place of missing or broken handlers.
...
...
@@ -24,7 +25,7 @@ public function adminLabel($short = FALSE) {
return
t
(
'Broken/missing handler'
);
}
public
function
init
(
&
$view
,
&
$options
)
{
}
public
function
init
(
ViewExecutable
$view
,
&
$options
)
{
}
public
function
defineOptions
()
{
return
array
();
}
public
function
ensureMyTable
()
{
/* No table to ensure! */
}
public
function
query
(
$group_by
=
FALSE
)
{
/* No query to run */
}
...
...
lib/Drupal/views/Plugin/views/filter/FilterPluginBase.php
View file @
2daec13e
...
...
@@ -9,6 +9,7 @@
use
Drupal\views\Plugin\views\HandlerBase
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\views\ViewExecutable
;
/**
* @defgroup views_filter_handlers Views filter handlers
...
...
@@ -78,7 +79,7 @@ abstract class FilterPluginBase extends HandlerBase {
* This likely has to be overridden by filters which are more complex
* than simple operator/value.
*/
public
function
init
(
&
$view
,
&
$options
)
{
public
function
init
(
ViewExecutable
$view
,
&
$options
)
{
parent
::
init
(
$view
,
$options
);
$this
->
operator
=
$this
->
options
[
'operator'
];
...
...
lib/Drupal/views/Plugin/views/filter/ManyToOne.php
View file @
2daec13e
...
...
@@ -7,6 +7,7 @@
namespace
Drupal\views\Plugin\views\filter
;
use
Drupal\views\ViewExecutable
;
use
Drupal\views\ManyToOneHelper
;
use
Drupal\Core\Annotation\Plugin
;
...
...
@@ -33,7 +34,7 @@ class ManyToOne extends InOperator {
*/
var
$helper
=
NULL
;
public
function
init
(
&
$view
,
&
$options
)
{
public
function
init
(
ViewExecutable
$view
,
&
$options
)
{
parent
::
init
(
$view
,
$options
);
$this
->
helper
=
new
ManyToOneHelper
(
$this
);
}
...
...
lib/Drupal/views/Plugin/views/pager/None.php
View file @
2daec13e
...
...
@@ -7,6 +7,7 @@
namespace
Drupal\views\Plugin\views\pager
;
use
Drupal\views\ViewExecutable
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Core\Annotation\Translation
;
...
...
@@ -24,7 +25,7 @@
*/
class
None
extends
PagerPluginBase
{
public
function
init
(
&
$view
,
&
$display
,
$options
=
array
())
{
public
function
init
(
ViewExecutable
$view
,
&
$display
,
$options
=
array
())
{
parent
::
init
(
$view
,
$display
,
$options
);
// If the pager is set to none, then it should show all items.
...
...
lib/Drupal/views/Plugin/views/pager/PagerPluginBase.php
View file @
2daec13e
...
...
@@ -8,6 +8,7 @@
namespace
Drupal\views\Plugin\views\pager
;
use
Drupal\views\Plugin\views\PluginBase
;
use
Drupal\views\ViewExecutable
;
/**
* @defgroup views_pager_plugins Views pager plugins
...
...
@@ -42,7 +43,7 @@ abstract class PagerPluginBase extends PluginBase {
* @param $display
* The display handler.
*/
public
function
init
(
&
$view
,
&
$display
,
$options
=
array
())
{
public
function
init
(
ViewExecutable
$view
,
&
$display
,
$options
=
array
())
{
$this
->
setOptionDefaults
(
$this
->
options
,
$this
->
defineOptions
());
$this
->
view
=
&
$view
;
$this
->
displayHandler
=
&
$display
;
...
...
lib/Drupal/views/Plugin/views/query/QueryPluginBase.php
View file @
2daec13e
...
...
@@ -8,6 +8,7 @@
namespace
Drupal\views\Plugin\views\query
;
use
Drupal\views\Plugin\views\PluginBase
;
use
Drupal\views\ViewExecutable
;
/**
* @todo.
...
...
@@ -46,7 +47,7 @@ public function query($get_count = FALSE) { }
* @param view $view
* The view which is executed.
*/
function
alter
(
&
$view
)
{
}
function
alter
(
ViewExecutable
$view
)
{
}
/**
* Builds the necessary info to execute the query.
...
...
@@ -54,7 +55,7 @@ function alter(&$view) { }
* @param view $view
* The view which is executed.
*/
function
build
(
&
$view
)
{
}
function
build
(
ViewExecutable
$view
)
{
}
/**
* Executes the query and fills the associated view object with according
...
...
@@ -69,7 +70,7 @@ function build(&$view) { }
* @param view $view
* The view which is executed.
*/
function
execute
(
&
$view
)
{
}
function
execute
(
ViewExecutable
$view
)
{
}
/**
* Add a signature to the query, if such a thing is feasible.
...
...
@@ -80,7 +81,7 @@ function execute(&$view) { }
* @param view $view
* The view which is executed.
*/
function
add_signature
(
&
$view
)
{
}
function
add_signature
(
ViewExecutable
$view
)
{
}
/**
* Get aggregation info for group by queries.
...
...
lib/Drupal/views/Plugin/views/query/Sql.php
View file @
2daec13e
...
...
@@ -12,6 +12,7 @@
use
Drupal\views\Plugin\views\join\JoinPluginBase
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\views\ViewExecutable
;
/**
* @todo.
...
...
@@ -1402,7 +1403,7 @@ function get_where_args() {
/**
* Let modules modify the query just prior to finalizing it.
*/
function
alter
(
&
$view
)
{
function
alter
(
ViewExecutable
$view
)
{
foreach
(
module_implements
(
'views_query_alter'
)
as
$module
)
{
$function
=
$module
.
'_views_query_alter'
;
$function
(
$view
,
$this
);
...
...
@@ -1412,7 +1413,7 @@ function alter(&$view) {
/**
* Builds the necessary info to execute the query.
*/
function
build
(
&
$view
)
{
function
build
(
ViewExecutable
$view
)
{
// Make the query distinct if the option was set.
if
(
!
empty
(
$this
->
options
[
'distinct'
]))
{
$this
->
set_distinct
(
TRUE
);
...
...
@@ -1437,7 +1438,7 @@ function build(&$view) {
* Values to set: $view->result, $view->total_rows, $view->execute_time,
* $view->current_page.
*/
function
execute
(
&
$view
)
{
function
execute
(
ViewExecutable
$view
)
{
$external
=
FALSE
;
// Whether this query will run against an external database.
$query
=
$view
->
build_info
[
'query'
];
$count_query
=
$view
->
build_info
[
'count_query'
];
...
...
@@ -1646,7 +1647,7 @@ function load_entities(&$results) {
}
}
function
add_signature
(
&
$view
)
{
function
add_signature
(
ViewExecutable
$view
)
{
$view
->
query
->
add_field
(
NULL
,
"'"
.
$view
->
storage
->
name
.
':'
.
$view
->
current_display
.
"'"
,
'view_name'
);
}
...
...
lib/Drupal/views/Plugin/views/relationship/GroupwiseMax.php
View file @
2daec13e
...
...
@@ -8,7 +8,6 @@
namespace
Drupal\views\Plugin\views\relationship
;
use
Drupal\Core\Database\Query\AlterableInterface
;
use
Drupal\views\ViewExecutable
;
use
Drupal\Core\Annotation\Plugin
;
/**
...
...
lib/Drupal/views/Plugin/views/relationship/RelationshipPluginBase.php
View file @
2daec13e
...
...
@@ -7,6 +7,7 @@
namespace
Drupal\views\Plugin\views\relationship
;
use
Drupal\views\ViewExecutable
;
use
Drupal\views\Plugin\views\HandlerBase
;
use
Drupal\views\Join
;
use
Drupal\Core\Annotation\Plugin
;
...
...
@@ -47,7 +48,7 @@ abstract class RelationshipPluginBase extends HandlerBase {
* Init handler to let relationships live on tables other than
* the table they operate on.
*/
public
function
init
(
&
$view
,
&
$options
)
{
public
function
init
(
ViewExecutable
$view
,
&
$options
)
{
$this
->
setOptionDefaults
(
$this
->
options
,
$this
->
defineOptions
());
parent
::
init
(
$view
,
$options
);
if
(
isset
(
$this
->
definition
[
'relationship table'
]))
{
...
...
lib/Drupal/views/Plugin/views/row/RowPluginBase.php
View file @
2daec13e
...
...
@@ -8,6 +8,7 @@
namespace
Drupal\views\Plugin\views\row
;
use
Drupal\views\Plugin\views\PluginBase
;
use
Drupal\views\ViewExecutable
;
/**
* @defgroup views_row_plugins Views row plugins
...
...
@@ -41,7 +42,7 @@ abstract class RowPluginBase extends PluginBase {
/**
* Initialize the row plugin.
*/
public
function
init
(
&
$view
,
&
$display
,
$options
=
NULL
)
{
public
function
init
(
ViewExecutable
$view
,
&
$display
,
$options
=
NULL
)
{
$this
->
setOptionDefaults
(
$this
->
options
,
$this
->
defineOptions
());
$this
->
view
=
&
$view
;
$this
->
displayHandler
=
&
$display
;
...
...
lib/Drupal/views/Plugin/views/sort/GroupByNumeric.php
View file @
2daec13e
...
...
@@ -8,6 +8,7 @@
namespace
Drupal\views\Plugin\views\sort
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\views\ViewExecutable
;
/**
* Handler for GROUP BY on simple numeric fields.
...
...
@@ -18,7 +19,7 @@
*/
class
GroupByNumeric
extends
SortPluginBase
{
public
function
init
(
&
$view
,
&
$options
)
{
public
function
init
(
ViewExecutable
$view
,
&
$options
)
{
parent
::
init
(
$view
,
$options
);
// Initialize the original handler.
...
...
lib/Drupal/views/Plugin/views/style/StylePluginBase.php
View file @
2daec13e
...
...
@@ -11,6 +11,7 @@
use
Drupal\views\Plugin\views\wizard\WizardInterface
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Core\Annotation\Translation
;
use
Drupal\views\ViewExecutable
;
/**
* @defgroup views_style_plugins Views style plugins
...
...
@@ -89,7 +90,7 @@ abstract class StylePluginBase extends PluginBase {
* The style options might come externally as the style can be sourced
* from at least two locations. If it's not included, look on the display.
*/
public
function
init
(
&
$view
,
&
$display
,
$options
=
NULL
)
{
public
function
init
(
ViewExecutable
$view
,
&
$display
,
$options
=
NULL
)
{
$this
->
setOptionDefaults
(
$this
->
options
,
$this
->
defineOptions
());
$this
->
view
=
&
$view
;
$this
->
displayHandler
=
&
$display
;
...
...
lib/Views/comment/Plugin/views/field/Comment.php
View file @
2daec13e
...
...
@@ -7,6 +7,7 @@
namespace
Views\comment\Plugin\views\field
;
use
Drupal\views\ViewExecutable
;
use
Drupal\views\Plugin\views\field\FieldPluginBase
;
use
Drupal\Core\Annotation\Plugin
;
...
...
@@ -25,7 +26,7 @@ class Comment extends FieldPluginBase {
/**
* Override init function to provide generic option to link to comment.
*/
public
function
init
(
&
$view
,
&
$options
)
{
public
function
init
(
ViewExecutable
$view
,
&
$options
)
{
parent
::
init
(
$view
,
$options
);
if
(
!
empty
(
$this
->
options
[
'link_to_comment'
]))
{
$this
->
additional_fields
[
'cid'
]
=
'cid'
;
...
...
lib/Views/comment/Plugin/views/field/Username.php
View file @
2daec13e
...
...
@@ -7,6 +7,7 @@
namespace
Views\comment\Plugin\views\field
;
use
Drupal\views\ViewExecutable
;
use
Drupal\views\Plugin\views\field\FieldPluginBase
;
use
Drupal\Core\Annotation\Plugin
;
...
...
@@ -25,7 +26,7 @@ class Username extends FieldPluginBase {
/**
* Override init function to add uid and homepage fields.
*/
public
function
init
(
&
$view
,
&
$data
)
{
public
function
init
(
ViewExecutable
$view
,
&
$data
)
{
parent
::
init
(
$view
,
$data
);
$this
->
additional_fields
[
'uid'
]
=
'uid'
;
$this
->
additional_fields
[
'homepage'
]
=
'homepage'
;
...
...
lib/Views/field/Plugin/views/argument/FieldList.php
View file @
2daec13e
...
...
@@ -7,6 +7,7 @@
namespace
Views\field\Plugin\views\argument
;
use
Drupal\views\ViewExecutable
;
use
Drupal\views\Plugin\views\argument\Numeric
;
use
Drupal\Core\Annotation\Plugin
;
...
...
@@ -30,7 +31,7 @@ class FieldList extends Numeric {
*/
var
$allowed_values
=
NULL
;
public
function
init
(
&
$view
,
&
$options
)
{
public
function
init
(
ViewExecutable
$view
,
&
$options
)
{
parent
::
init
(
$view
,
$options
);
$field
=
field_info_field
(
$this
->
definition
[
'field_name'
]);
$this
->
allowed_values
=
options_allowed_values
(
$field
);
...
...
lib/Views/field/Plugin/views/argument/ListString.php
View file @
2daec13e
...
...
@@ -7,6 +7,7 @@
namespace
Views\field\Plugin\views\argument
;
use
Drupal\views\ViewExecutable
;
use
Drupal\views\Plugin\views\argument\String
;