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
228
Merge Requests
228
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
03a3b248
Commit
03a3b248
authored
Sep 12, 2012
by
tim.plunkett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#1727266
by tim.plunkett: Move PluginBase::getTypes() to View::getPluginTypes().
parent
e14fbaa3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
34 deletions
+33
-34
lib/Drupal/views/Plugin/views/PluginBase.php
lib/Drupal/views/Plugin/views/PluginBase.php
+0
-30
lib/Drupal/views/View.php
lib/Drupal/views/View.php
+30
-0
lib/Drupal/views/ViewsBundle.php
lib/Drupal/views/ViewsBundle.php
+2
-2
views.module
views.module
+1
-2
No files found.
lib/Drupal/views/Plugin/views/PluginBase.php
View file @
03a3b248
...
...
@@ -51,36 +51,6 @@ public function __construct(array $configuration, $plugin_id, DiscoveryInterface
$this
->
construct
();
}
/**
* Returns the valid types of plugins that can be used.
*
* @return array
* An array of plugin type strings.
*/
public
static
function
getTypes
()
{
return
array
(
'access'
,
'area'
,
'argument'
,
'argument_default'
,
'argument_validator'
,
'cache'
,
'display_extender'
,
'display'
,
'exposed_form'
,
'field'
,
'filter'
,
'join'
,
'pager'
,
'query'
,
'relationship'
,
'row'
,
'sort'
,
'style'
,
'wizard'
,
);
}
/**
* Information about options for all kinds of purposes will be held here.
* @code
...
...
lib/Drupal/views/View.php
View file @
03a3b248
...
...
@@ -2067,6 +2067,36 @@ public function isTranslatable() {
return
(
!
isset
(
$this
->
type
)
||
in_array
(
$this
->
type
,
array
(
t
(
'Normal'
),
t
(
'Overridden'
))))
?
TRUE
:
FALSE
;
}
/**
* Returns the valid types of plugins that can be used.
*
* @return array
* An array of plugin type strings.
*/
public
static
function
getPluginTypes
()
{
return
array
(
'access'
,
'area'
,
'argument'
,
'argument_default'
,
'argument_validator'
,
'cache'
,
'display_extender'
,
'display'
,
'exposed_form'
,
'field'
,
'filter'
,
'join'
,
'pager'
,
'query'
,
'relationship'
,
'row'
,
'sort'
,
'style'
,
'wizard'
,
);
}
/**
* Provide a list of views handler types used in a view, with some information
* about them.
...
...
lib/Drupal/views/ViewsBundle.php
View file @
03a3b248
...
...
@@ -9,7 +9,7 @@
use
Symfony\Component\DependencyInjection\ContainerBuilder
;
use
Symfony\Component\HttpKernel\Bundle\Bundle
;
use
Drupal\views\
Plugin\views\PluginBase
;
use
Drupal\views\
View
;
/**
* Views dependency injection container.
...
...
@@ -20,7 +20,7 @@ class ViewsBundle extends Bundle {
* Overrides Symfony\Component\HttpKernel\Bundle\Bundle::build().
*/
public
function
build
(
ContainerBuilder
$container
)
{
foreach
(
PluginBase
::
get
Types
()
as
$type
)
{
foreach
(
View
::
getPlugin
Types
()
as
$type
)
{
$container
->
register
(
"plugin.manager.views.
$type
"
,
'Drupal\views\Plugin\Type\ViewsPluginManager'
)
->
addArgument
(
$type
);
}
...
...
views.module
View file @
03a3b248
...
...
@@ -12,7 +12,6 @@
use
Drupal\Core\Database\Query\AlterableInterface
;
use
Drupal\views\TempStore\UserTempStore
;
use
Drupal\views\View
;
use
Drupal\views\Plugin\views\PluginBase
;
use
Drupal\Component\Plugin\Exception\PluginException
;
/**
...
...
@@ -1427,7 +1426,7 @@ function views_get_plugin($type, $plugin_id) {
*/
function
views_get_plugin_definitions
(
$type
=
FALSE
)
{
$plugins
=
array
();
$plugin_types
=
$type
?
array
(
$type
)
:
PluginBase
::
get
Types
();
$plugin_types
=
$type
?
array
(
$type
)
:
View
::
getPlugin
Types
();
$container
=
drupal_container
();
foreach
(
$plugin_types
as
$plugin_type
)
{
$plugins
[
$plugin_type
]
=
$container
->
get
(
"plugin.manager.views.
$plugin_type
"
)
->
getDefinitions
();
...
...
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