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
304
Merge Requests
304
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
db385738
Commit
db385738
authored
May 28, 2013
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2003044
by dwieeb: Rename Views method get_plugin() to getPlugin().
parent
55f5d78e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
...Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
+13
-13
core/modules/views/lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php
...ews/lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php
+1
-1
No files found.
core/modules/views/lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
View file @
db385738
...
...
@@ -324,7 +324,7 @@ public function buildOptionsForm(&$form, &$form_state) {
// If we decide this validator is ok, add it to the list.
if
(
$valid
)
{
$plugin
=
$this
->
get
_p
lugin
(
'argument_validator'
,
$id
);
$plugin
=
$this
->
get
P
lugin
(
'argument_validator'
,
$id
);
if
(
$plugin
)
{
if
(
$plugin
->
access
()
||
$this
->
options
[
'validate'
][
'type'
]
==
$id
)
{
$form
[
'validate'
][
'options'
][
$id
]
=
array
(
...
...
@@ -373,20 +373,20 @@ public function validateOptionsForm(&$form, &$form_state) {
// Let the plugins do validation.
$default_id
=
$form_state
[
'values'
][
'options'
][
'default_argument_type'
];
$plugin
=
$this
->
get
_p
lugin
(
'argument_default'
,
$default_id
);
$plugin
=
$this
->
get
P
lugin
(
'argument_default'
,
$default_id
);
if
(
$plugin
)
{
$plugin
->
validateOptionsForm
(
$form
[
'argument_default'
][
$default_id
],
$form_state
,
$form_state
[
'values'
][
'options'
][
'argument_default'
][
$default_id
]);
}
// summary plugin
$summary_id
=
$form_state
[
'values'
][
'options'
][
'summary'
][
'format'
];
$plugin
=
$this
->
get
_p
lugin
(
'style'
,
$summary_id
);
$plugin
=
$this
->
get
P
lugin
(
'style'
,
$summary_id
);
if
(
$plugin
)
{
$plugin
->
validateOptionsForm
(
$form
[
'summary'
][
'options'
][
$summary_id
],
$form_state
,
$form_state
[
'values'
][
'options'
][
'summary'
][
'options'
][
$summary_id
]);
}
$validate_id
=
$form_state
[
'values'
][
'options'
][
'validate'
][
'type'
];
$plugin
=
$this
->
get
_p
lugin
(
'argument_validator'
,
$validate_id
);
$plugin
=
$this
->
get
P
lugin
(
'argument_validator'
,
$validate_id
);
if
(
$plugin
)
{
$plugin
->
validateOptionsForm
(
$form
[
'validate'
][
'options'
][
$default_id
],
$form_state
,
$form_state
[
'values'
][
'options'
][
'validate'
][
'options'
][
$validate_id
]);
}
...
...
@@ -400,7 +400,7 @@ public function submitOptionsForm(&$form, &$form_state) {
// Let the plugins make submit modifications if necessary.
$default_id
=
$form_state
[
'values'
][
'options'
][
'default_argument_type'
];
$plugin
=
$this
->
get
_p
lugin
(
'argument_default'
,
$default_id
);
$plugin
=
$this
->
get
P
lugin
(
'argument_default'
,
$default_id
);
if
(
$plugin
)
{
$options
=
&
$form_state
[
'values'
][
'options'
][
'argument_default'
][
$default_id
];
$plugin
->
submitOptionsForm
(
$form
[
'argument_default'
][
$default_id
],
$form_state
,
$options
);
...
...
@@ -410,7 +410,7 @@ public function submitOptionsForm(&$form, &$form_state) {
// summary plugin
$summary_id
=
$form_state
[
'values'
][
'options'
][
'summary'
][
'format'
];
$plugin
=
$this
->
get
_p
lugin
(
'style'
,
$summary_id
);
$plugin
=
$this
->
get
P
lugin
(
'style'
,
$summary_id
);
if
(
$plugin
)
{
$options
=
&
$form_state
[
'values'
][
'options'
][
'summary'
][
'options'
][
$summary_id
];
$plugin
->
submitOptionsForm
(
$form
[
'summary'
][
'options'
][
$summary_id
],
$form_state
,
$options
);
...
...
@@ -419,7 +419,7 @@ public function submitOptionsForm(&$form, &$form_state) {
}
$validate_id
=
$form_state
[
'values'
][
'options'
][
'validate'
][
'type'
];
$plugin
=
$this
->
get
_p
lugin
(
'argument_validator'
,
$validate_id
);
$plugin
=
$this
->
get
P
lugin
(
'argument_validator'
,
$validate_id
);
if
(
$plugin
)
{
$options
=
&
$form_state
[
'values'
][
'options'
][
'validate'
][
'options'
][
$validate_id
];
$plugin
->
submitOptionsForm
(
$form
[
'validate'
][
'options'
][
$validate_id
],
$form_state
,
$options
);
...
...
@@ -529,7 +529,7 @@ function default_argument_form(&$form, &$form_state) {
if
(
!
empty
(
$info
[
'no_ui'
]))
{
continue
;
}
$plugin
=
$this
->
get
_p
lugin
(
'argument_default'
,
$id
);
$plugin
=
$this
->
get
P
lugin
(
'argument_default'
,
$id
);
if
(
$plugin
)
{
if
(
$plugin
->
access
()
||
$this
->
options
[
'default_argument_type'
]
==
$id
)
{
$form
[
'argument_default'
][
'#argument_option'
]
=
'default'
;
...
...
@@ -617,7 +617,7 @@ public function defaultSummaryForm(&$form, &$form_state) {
);
foreach
(
$summary_plugins
as
$id
=>
$info
)
{
$plugin
=
$this
->
get
_p
lugin
(
'style'
,
$id
);
$plugin
=
$this
->
get
P
lugin
(
'style'
,
$id
);
if
(
!
$plugin
->
usesOptions
())
{
continue
;
}
...
...
@@ -742,7 +742,7 @@ function hasDefaultArgument() {
* Get a default argument, if available.
*/
function
get_default_argument
()
{
$plugin
=
$this
->
get
_p
lugin
(
'argument_default'
);
$plugin
=
$this
->
get
P
lugin
(
'argument_default'
);
if
(
$plugin
)
{
return
$plugin
->
get_argument
();
}
...
...
@@ -756,7 +756,7 @@ function get_default_argument() {
*/
function
process_summary_arguments
(
&
$args
)
{
if
(
$this
->
options
[
'validate'
][
'type'
]
!=
'none'
)
{
if
(
isset
(
$this
->
validator
)
||
$this
->
validator
=
$this
->
get
_p
lugin
(
'argument_validator'
))
{
if
(
isset
(
$this
->
validator
)
||
$this
->
validator
=
$this
->
get
P
lugin
(
'argument_validator'
))
{
$this
->
validator
->
process_summary_arguments
(
$args
);
}
}
...
...
@@ -949,7 +949,7 @@ public function validateArgument($arg) {
return
$this
->
argument_validated
=
TRUE
;
}
$plugin
=
$this
->
get
_p
lugin
(
'argument_validator'
);
$plugin
=
$this
->
get
P
lugin
(
'argument_validator'
);
return
$this
->
argument_validated
=
$plugin
->
validate_argument
(
$arg
);
}
...
...
@@ -1031,7 +1031,7 @@ function get_value() {
/**
* Get the display or row plugin, if it exists.
*/
function
get_p
lugin
(
$type
=
'argument_default'
,
$name
=
NULL
)
{
public
function
getP
lugin
(
$type
=
'argument_default'
,
$name
=
NULL
)
{
$options
=
array
();
switch
(
$type
)
{
case
'argument_default'
:
...
...
core/modules/views/lib/Drupal/views/Tests/Plugin/ArgumentDefaultTest.php
View file @
db385738
...
...
@@ -61,7 +61,7 @@ public function testArgumentDefaultPlugin() {
);
$id
=
$view
->
addItem
(
'default'
,
'argument'
,
'views_test_data'
,
'name'
,
$options
);
$view
->
initHandlers
();
$plugin
=
$view
->
argument
[
$id
]
->
get
_p
lugin
(
'argument_default'
);
$plugin
=
$view
->
argument
[
$id
]
->
get
P
lugin
(
'argument_default'
);
$this
->
assertTrue
(
$plugin
instanceof
ArgumentDefaultTestPlugin
,
'The correct argument default plugin is used.'
);
// Check that the value of the default argument is as expected.
...
...
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