Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
a5ce14d9
Commit
a5ce14d9
authored
Jul 27, 2012
by
dawehner
Committed by
tim.plunkett
Oct 21, 2012
Browse files
Experiment with module handler as PSR0
parent
9b956ea6
Changes
3
Hide whitespace changes
Inline
Side-by-side
modules/node/views_handler_filter_node_s
tatus.
inc
→
lib/Drupal/node/Plugins/views/filter/S
tatus.
php
View file @
a5ce14d9
...
...
@@ -2,9 +2,11 @@
/**
* @file
* Definition of
views_handler_filter_node_s
tatus
.
* Definition of
Drupal\node\Plugins\views\filter\S
tatus
*/
namespace
Drupal\node\Plugins\views\filter
;
use
Drupal\views\Plugins\views\filter\FilterPluginBase
;
/**
...
...
@@ -12,7 +14,7 @@
*
* @ingroup views_filter_handlers
*/
class
views_handler_filter_node_s
tatus
extends
FilterPluginBase
{
class
S
tatus
extends
FilterPluginBase
{
function
admin_summary
()
{
}
function
operator_form
(
&
$form
,
&
$form_state
)
{
}
function
can_expose
()
{
return
FALSE
;
}
...
...
modules/node.views.inc
View file @
a5ce14d9
...
...
@@ -172,7 +172,7 @@ function node_views_data() {
'help'
=>
t
(
'Filters out unpublished content if the current user cannot view it.'
),
'filter'
=>
array
(
'field'
=>
'status'
,
'handler'
=>
'
views_handler_filter_node_s
tatus'
,
'handler'
=>
'
Drupal\node\Plugins\views\filter\S
tatus'
,
'label'
=>
t
(
'Published or admin'
),
),
);
...
...
views.module
View file @
a5ce14d9
...
...
@@ -33,6 +33,23 @@ function views_api_version() {
return
'3.0'
;
}
/**
* Implements hook_init().
*
*
*/
function
views_init
()
{
$core_modules
=
array
(
'aggregator'
,
'book'
,
'comment'
,
'contact'
,
'field'
,
'filter'
,
'locale'
,
'node'
,
'search'
,
'statistics'
,
'system'
,
'taxonomy'
,
'translation'
,
'user'
);
$path
=
drupal_get_path
(
'module'
,
'views'
);
$loader
=
drupal_classloader
();
foreach
(
$core_modules
as
$module
)
{
if
(
function_exists
(
$module
.
'_views_api'
))
{
$name
=
$module
.
'\\Plugins'
;
$loader
->
registerNamespace
(
'Drupal\\'
.
$name
,
DRUPAL_ROOT
.
'/'
.
$path
.
'/lib'
);
}
}
}
/**
* Implements hook_ctools_exportable_info().
*/
...
...
Write
Preview
Supports
Markdown
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