Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
dd7d246b
Commit
dd7d246b
authored
12 years ago
by
Daniel Wehner
Committed by
Tim Plunkett
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
add the missing handler.php file
parent
44c25bdf
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/Drupal/views/Plugins/views/Handler.php
+77
-0
77 additions, 0 deletions
lib/Drupal/views/Plugins/views/Handler.php
with
77 additions
and
0 deletions
lib/Drupal/views/Plugins/views/Handler.php
0 → 100644
+
77
−
0
View file @
dd7d246b
<?php
/**
* @file
* Definition of Drupal\views\Plugins\views\Handler
*/
namespace
Drupal\views\Plugins\views
;
use
Drupal\views\Plugins\views\Plugin
;
use
Drupal\views\View
;
class
Handler
extends
Plugin
{
/**
* init the handler with necessary data.
* @param $view
* The $view object this handler is attached to.
* @param $options
* The item from the database; the actual contents of this will vary
* based upon the type of handler.
*/
function
init
(
&
$view
,
&
$options
)
{
$this
->
view
=
&
$view
;
$display_id
=
$this
->
view
->
current_display
;
// Check to see if this handler type is defaulted. Note that
// we have to do a lookup because the type is singular but the
// option is stored as the plural.
// If the 'moved to' keyword moved our handler, let's fix that now.
if
(
isset
(
$this
->
actual_table
))
{
$options
[
'table'
]
=
$this
->
actual_table
;
}
if
(
isset
(
$this
->
actual_field
))
{
$options
[
'field'
]
=
$this
->
actual_field
;
}
$types
=
View
::
views_object_types
();
$plural
=
$this
->
handler_type
;
if
(
isset
(
$types
[
$this
->
handler_type
][
'plural'
]))
{
$plural
=
$types
[
$this
->
handler_type
][
'plural'
];
}
if
(
$this
->
view
->
display_handler
->
is_defaulted
(
$plural
))
{
$display_id
=
'default'
;
}
$this
->
localization_keys
=
array
(
$display_id
,
$this
->
handler_type
,
$options
[
'table'
],
$options
[
'id'
]
);
$this
->
unpack_options
(
$this
->
options
,
$options
);
// This exist on most handlers, but not all. So they are still optional.
if
(
isset
(
$options
[
'table'
]))
{
$this
->
table
=
$options
[
'table'
];
}
if
(
isset
(
$this
->
definition
[
'real field'
]))
{
$this
->
real_field
=
$this
->
definition
[
'real field'
];
}
if
(
isset
(
$this
->
definition
[
'field'
]))
{
$this
->
real_field
=
$this
->
definition
[
'field'
];
}
if
(
isset
(
$options
[
'field'
]))
{
$this
->
field
=
$options
[
'field'
];
if
(
!
isset
(
$this
->
real_field
))
{
$this
->
real_field
=
$options
[
'field'
];
}
}
$this
->
query
=
&
$view
->
query
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment