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
229
Merge Requests
229
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
3b3e139c
Commit
3b3e139c
authored
Sep 17, 2012
by
aspilicious
Committed by
tim.plunkett
Oct 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#1776686
by aspilicious, tim.plunkett: Merge __construct() and construct().
parent
32cda049
Changes
30
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
171 additions
and
86 deletions
+171
-86
lib/Drupal/views/Plugin/views/PluginBase.php
lib/Drupal/views/Plugin/views/PluginBase.php
+0
-9
lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
...Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
+4
-3
lib/Drupal/views/Plugin/views/argument/Formula.php
lib/Drupal/views/Plugin/views/argument/Formula.php
+4
-3
lib/Drupal/views/Plugin/views/field/FieldPluginBase.php
lib/Drupal/views/Plugin/views/field/FieldPluginBase.php
+4
-3
lib/Drupal/views/Plugin/views/filter/BooleanOperator.php
lib/Drupal/views/Plugin/views/filter/BooleanOperator.php
+7
-2
lib/Drupal/views/Plugin/views/filter/InOperator.php
lib/Drupal/views/Plugin/views/filter/InOperator.php
+7
-2
lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php
lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php
+5
-5
lib/Views/aggregator/Plugin/views/field/Category.php
lib/Views/aggregator/Plugin/views/field/Category.php
+4
-3
lib/Views/aggregator/Plugin/views/field/TitleLink.php
lib/Views/aggregator/Plugin/views/field/TitleLink.php
+7
-2
lib/Views/comment/Plugin/views/field/LastTimestamp.php
lib/Views/comment/Plugin/views/field/LastTimestamp.php
+7
-2
lib/Views/comment/Plugin/views/field/NodeNewComments.php
lib/Views/comment/Plugin/views/field/NodeNewComments.php
+7
-2
lib/Views/filter/Plugin/views/field/FormatName.php
lib/Views/filter/Plugin/views/field/FormatName.php
+7
-2
lib/Views/locale/Plugin/views/field/LinkEdit.php
lib/Views/locale/Plugin/views/field/LinkEdit.php
+7
-2
lib/Views/node/Plugin/views/argument/CreatedDay.php
lib/Views/node/Plugin/views/argument/CreatedDay.php
+5
-3
lib/Views/node/Plugin/views/argument/CreatedFullDate.php
lib/Views/node/Plugin/views/argument/CreatedFullDate.php
+5
-3
lib/Views/node/Plugin/views/argument/CreatedMonth.php
lib/Views/node/Plugin/views/argument/CreatedMonth.php
+5
-3
lib/Views/node/Plugin/views/argument/CreatedWeek.php
lib/Views/node/Plugin/views/argument/CreatedWeek.php
+5
-3
lib/Views/node/Plugin/views/argument/CreatedYear.php
lib/Views/node/Plugin/views/argument/CreatedYear.php
+5
-3
lib/Views/node/Plugin/views/argument/CreatedYearMonth.php
lib/Views/node/Plugin/views/argument/CreatedYearMonth.php
+5
-3
lib/Views/node/Plugin/views/argument/Type.php
lib/Views/node/Plugin/views/argument/Type.php
+0
-4
lib/Views/node/Plugin/views/field/Path.php
lib/Views/node/Plugin/views/field/Path.php
+10
-5
lib/Views/node/Plugin/views/field/RevisionLink.php
lib/Views/node/Plugin/views/field/RevisionLink.php
+7
-2
lib/Views/taxonomy/Plugin/views/field/LinkEdit.php
lib/Views/taxonomy/Plugin/views/field/LinkEdit.php
+7
-2
lib/Views/taxonomy/Plugin/views/field/Taxonomy.php
lib/Views/taxonomy/Plugin/views/field/Taxonomy.php
+5
-3
lib/Views/translation/Plugin/views/field/NodeTranslationLink.php
...ws/translation/Plugin/views/field/NodeTranslationLink.php
+7
-2
lib/Views/user/Plugin/views/field/Link.php
lib/Views/user/Plugin/views/field/Link.php
+7
-2
lib/Views/user/Plugin/views/field/Permissions.php
lib/Views/user/Plugin/views/field/Permissions.php
+7
-2
lib/Views/user/Plugin/views/field/Picture.php
lib/Views/user/Plugin/views/field/Picture.php
+7
-2
lib/Views/user/Plugin/views/field/Roles.php
lib/Views/user/Plugin/views/field/Roles.php
+7
-2
lib/Views/user/Plugin/views/filter/Current.php
lib/Views/user/Plugin/views/filter/Current.php
+7
-2
No files found.
lib/Drupal/views/Plugin/views/PluginBase.php
View file @
3b3e139c
...
@@ -47,8 +47,6 @@ public function __construct(array $configuration, $plugin_id, DiscoveryInterface
...
@@ -47,8 +47,6 @@ public function __construct(array $configuration, $plugin_id, DiscoveryInterface
parent
::
__construct
(
$configuration
,
$plugin_id
,
$discovery
);
parent
::
__construct
(
$configuration
,
$plugin_id
,
$discovery
);
$this
->
definition
=
$this
->
discovery
->
getDefinition
(
$plugin_id
)
+
$configuration
;
$this
->
definition
=
$this
->
discovery
->
getDefinition
(
$plugin_id
)
+
$configuration
;
$this
->
construct
();
}
}
/**
/**
...
@@ -69,13 +67,6 @@ public function __construct(array $configuration, $plugin_id, DiscoveryInterface
...
@@ -69,13 +67,6 @@ public function __construct(array $configuration, $plugin_id, DiscoveryInterface
*/
*/
protected
function
defineOptions
()
{
return
array
();
}
protected
function
defineOptions
()
{
return
array
();
}
/**
* Views handlers use a special construct function so that we can more
* easily construct them with variable arguments.
*/
public
function
construct
()
{
}
protected
function
setOptionDefaults
(
&
$storage
,
$options
,
$level
=
0
)
{
protected
function
setOptionDefaults
(
&
$storage
,
$options
,
$level
=
0
)
{
foreach
(
$options
as
$option
=>
$definition
)
{
foreach
(
$options
as
$option
=>
$definition
)
{
if
(
isset
(
$definition
[
'contains'
])
&&
is_array
(
$definition
[
'contains'
]))
{
if
(
isset
(
$definition
[
'contains'
])
&&
is_array
(
$definition
[
'contains'
]))
{
...
...
lib/Drupal/views/Plugin/views/argument/ArgumentPluginBase.php
View file @
3b3e139c
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
use
Drupal\views\Plugin\views\PluginBase
;
use
Drupal\views\Plugin\views\PluginBase
;
use
Drupal\views\Plugin\views\HandlerBase
;
use
Drupal\views\Plugin\views\HandlerBase
;
use
Drupal\Component\Plugin\Discovery\DiscoveryInterface
;
/**
/**
* @defgroup views_argument_handlers Views argument handlers
* @defgroup views_argument_handlers Views argument handlers
...
@@ -61,10 +62,10 @@ abstract class ArgumentPluginBase extends HandlerBase {
...
@@ -61,10 +62,10 @@ abstract class ArgumentPluginBase extends HandlerBase {
var
$name_field
;
var
$name_field
;
/**
/**
* Construct
or
* Construct
s a ArgumentPluginBase object.
*/
*/
public
function
construct
(
)
{
public
function
__construct
(
array
$configuration
,
$plugin_id
,
DiscoveryInterface
$discovery
)
{
parent
::
construct
(
);
parent
::
__construct
(
$configuration
,
$plugin_id
,
$discovery
);
if
(
!
empty
(
$this
->
definition
[
'name field'
]))
{
if
(
!
empty
(
$this
->
definition
[
'name field'
]))
{
$this
->
name_field
=
$this
->
definition
[
'name field'
];
$this
->
name_field
=
$this
->
definition
[
'name field'
];
...
...
lib/Drupal/views/Plugin/views/argument/Formula.php
View file @
3b3e139c
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
namespace
Drupal\views\Plugin\views\argument
;
namespace
Drupal\views\Plugin\views\argument
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Component\Plugin\Discovery\DiscoveryInterface
;
/**
/**
* Abstract argument handler for simple formulae.
* Abstract argument handler for simple formulae.
...
@@ -28,10 +29,10 @@ class Formula extends ArgumentPluginBase {
...
@@ -28,10 +29,10 @@ class Formula extends ArgumentPluginBase {
var
$formula
=
NULL
;
var
$formula
=
NULL
;
/**
/**
* Construct
or
* Construct
s a Formula object.
*/
*/
public
function
construct
(
)
{
public
function
__construct
(
array
$configuration
,
$plugin_id
,
DiscoveryInterface
$discovery
)
{
parent
::
construct
(
);
parent
::
__construct
(
$configuration
,
$plugin_id
,
$discovery
);
if
(
!
empty
(
$this
->
definition
[
'formula'
]))
{
if
(
!
empty
(
$this
->
definition
[
'formula'
]))
{
$this
->
formula
=
$this
->
definition
[
'formula'
];
$this
->
formula
=
$this
->
definition
[
'formula'
];
...
...
lib/Drupal/views/Plugin/views/field/FieldPluginBase.php
View file @
3b3e139c
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
use
Drupal\views\Plugin\views\HandlerBase
;
use
Drupal\views\Plugin\views\HandlerBase
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Component\Plugin\Discovery\DiscoveryInterface
;
/**
/**
* @defgroup views_field_handlers Views field handlers
* @defgroup views_field_handlers Views field handlers
...
@@ -67,10 +68,10 @@ abstract class FieldPluginBase extends HandlerBase {
...
@@ -67,10 +68,10 @@ abstract class FieldPluginBase extends HandlerBase {
var
$additional_fields
=
array
();
var
$additional_fields
=
array
();
/**
/**
* Construct
a new field handler
.
* Construct
s a FieldPluginBase object
.
*/
*/
public
function
construct
(
)
{
public
function
__construct
(
array
$configuration
,
$plugin_id
,
DiscoveryInterface
$discovery
)
{
parent
::
construct
(
);
parent
::
__construct
(
$configuration
,
$plugin_id
,
$discovery
);
$this
->
additional_fields
=
array
();
$this
->
additional_fields
=
array
();
if
(
!
empty
(
$this
->
definition
[
'additional fields'
]))
{
if
(
!
empty
(
$this
->
definition
[
'additional fields'
]))
{
...
...
lib/Drupal/views/Plugin/views/filter/BooleanOperator.php
View file @
3b3e139c
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
namespace
Drupal\views\Plugin\views\filter
;
namespace
Drupal\views\Plugin\views\filter
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Component\Plugin\Discovery\DiscoveryInterface
;
/**
/**
* Simple filter to handle matching of boolean values
* Simple filter to handle matching of boolean values
...
@@ -38,7 +39,12 @@ class BooleanOperator extends FilterPluginBase {
...
@@ -38,7 +39,12 @@ class BooleanOperator extends FilterPluginBase {
// Whether to accept NULL as a false value or not
// Whether to accept NULL as a false value or not
var
$accept_null
=
FALSE
;
var
$accept_null
=
FALSE
;
public
function
construct
()
{
/**
* Constructs a BooleanOperator object.
*/
public
function
__construct
(
array
$configuration
,
$plugin_id
,
DiscoveryInterface
$discovery
)
{
parent
::
__construct
(
$configuration
,
$plugin_id
,
$discovery
);
$this
->
value_value
=
t
(
'True'
);
$this
->
value_value
=
t
(
'True'
);
if
(
isset
(
$this
->
definition
[
'label'
]))
{
if
(
isset
(
$this
->
definition
[
'label'
]))
{
$this
->
value_value
=
$this
->
definition
[
'label'
];
$this
->
value_value
=
$this
->
definition
[
'label'
];
...
@@ -50,7 +56,6 @@ public function construct() {
...
@@ -50,7 +56,6 @@ public function construct() {
$this
->
accept_null
=
(
bool
)
$this
->
definition
[
'accept_null'
];
$this
->
accept_null
=
(
bool
)
$this
->
definition
[
'accept_null'
];
}
}
$this
->
value_options
=
NULL
;
$this
->
value_options
=
NULL
;
parent
::
construct
();
}
}
/**
/**
...
...
lib/Drupal/views/Plugin/views/filter/InOperator.php
View file @
3b3e139c
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
namespace
Drupal\views\Plugin\views\filter
;
namespace
Drupal\views\Plugin\views\filter
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Component\Plugin\Discovery\DiscoveryInterface
;
/**
/**
* Simple filter to handle matching of multiple options selectable via checkboxes
* Simple filter to handle matching of multiple options selectable via checkboxes
...
@@ -32,8 +33,12 @@ class InOperator extends FilterPluginBase {
...
@@ -32,8 +33,12 @@ class InOperator extends FilterPluginBase {
*/
*/
var
$value_options
=
NULL
;
var
$value_options
=
NULL
;
public
function
construct
()
{
/**
parent
::
construct
();
* Constructs a BooleanOperator object.
*/
public
function
__construct
(
array
$configuration
,
$plugin_id
,
DiscoveryInterface
$discovery
)
{
parent
::
__construct
(
$configuration
,
$plugin_id
,
$discovery
);
$this
->
value_title
=
t
(
'Options'
);
$this
->
value_title
=
t
(
'Options'
);
$this
->
value_options
=
NULL
;
$this
->
value_options
=
NULL
;
}
}
...
...
lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php
View file @
3b3e139c
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
use
Drupal\views\Plugin\views\display\DisplayPluginBase
;
use
Drupal\views\Plugin\views\display\DisplayPluginBase
;
use
Drupal\views\Plugin\views\PluginBase
;
use
Drupal\views\Plugin\views\PluginBase
;
use
Drupal\views\Plugin\views\wizard\WizardInterface
;
use
Drupal\views\Plugin\views\wizard\WizardInterface
;
use
Drupal\Component\Plugin\Discovery\DiscoveryInterface
;
/**
/**
* Provides the interface and base class for Views Wizard plugins.
* Provides the interface and base class for Views Wizard plugins.
...
@@ -108,12 +109,11 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface {
...
@@ -108,12 +109,11 @@ abstract class WizardPluginBase extends PluginBase implements WizardInterface {
);
);
/**
/**
* Constructs the WizardPluginBase object.
* Constructs a WizardPluginBase object.
*
* @param array $definition
* The information stored in the annotation definition.
*/
*/
function
construct
()
{
public
function
__construct
(
array
$configuration
,
$plugin_id
,
DiscoveryInterface
$discovery
)
{
parent
::
__construct
(
$configuration
,
$plugin_id
,
$discovery
);
$this
->
base_table
=
$this
->
definition
[
'base_table'
];
$this
->
base_table
=
$this
->
definition
[
'base_table'
];
$entities
=
entity_get_info
();
$entities
=
entity_get_info
();
...
...
lib/Views/aggregator/Plugin/views/field/Category.php
View file @
3b3e139c
...
@@ -24,10 +24,11 @@
...
@@ -24,10 +24,11 @@
class
Category
extends
FieldPluginBase
{
class
Category
extends
FieldPluginBase
{
/**
/**
* Construct
or to provide additional field to add
.
* Construct
s a Category object
.
*/
*/
public
function
construct
()
{
public
function
__construct
(
array
$configuration
,
$plugin_id
,
DiscoveryInterface
$discovery
)
{
parent
::
construct
();
parent
::
__construct
(
$configuration
,
$plugin_id
,
$discovery
);
$this
->
additional_fields
[
'cid'
]
=
'cid'
;
$this
->
additional_fields
[
'cid'
]
=
'cid'
;
}
}
...
...
lib/Views/aggregator/Plugin/views/field/TitleLink.php
View file @
3b3e139c
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
use
Drupal\views\Plugin\views\field\FieldPluginBase
;
use
Drupal\views\Plugin\views\field\FieldPluginBase
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Component\Plugin\Discovery\DiscoveryInterface
;
/**
/**
* Field handler that turns an item's title into a clickable link to the original
* Field handler that turns an item's title into a clickable link to the original
...
@@ -23,8 +24,12 @@
...
@@ -23,8 +24,12 @@
*/
*/
class
TitleLink
extends
FieldPluginBase
{
class
TitleLink
extends
FieldPluginBase
{
public
function
construct
()
{
/**
parent
::
construct
();
* Constructs a Category object.
*/
public
function
__construct
(
array
$configuration
,
$plugin_id
,
DiscoveryInterface
$discovery
)
{
parent
::
__construct
(
$configuration
,
$plugin_id
,
$discovery
);
$this
->
additional_fields
[
'link'
]
=
'link'
;
$this
->
additional_fields
[
'link'
]
=
'link'
;
}
}
...
...
lib/Views/comment/Plugin/views/field/LastTimestamp.php
View file @
3b3e139c
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
use
Drupal\views\Plugin\views\field\Date
;
use
Drupal\views\Plugin\views\field\Date
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Component\Plugin\Discovery\DiscoveryInterface
;
/**
/**
* Field handler to display the timestamp of a comment with the count of comments.
* Field handler to display the timestamp of a comment with the count of comments.
...
@@ -22,8 +23,12 @@
...
@@ -22,8 +23,12 @@
*/
*/
class
LastTimestamp
extends
Date
{
class
LastTimestamp
extends
Date
{
public
function
construct
()
{
/**
parent
::
construct
();
* Constructs a LastTimestamp object.
*/
public
function
__construct
(
array
$configuration
,
$plugin_id
,
DiscoveryInterface
$discovery
)
{
parent
::
__construct
(
$configuration
,
$plugin_id
,
$discovery
);
$this
->
additional_fields
[
'comment_count'
]
=
'comment_count'
;
$this
->
additional_fields
[
'comment_count'
]
=
'comment_count'
;
}
}
...
...
lib/Views/comment/Plugin/views/field/NodeNewComments.php
View file @
3b3e139c
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
use
Drupal\views\Plugin\views\field\Numeric
;
use
Drupal\views\Plugin\views\field\Numeric
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Component\Plugin\Discovery\DiscoveryInterface
;
/**
/**
* Field handler to display the number of new comments.
* Field handler to display the number of new comments.
...
@@ -22,8 +23,12 @@
...
@@ -22,8 +23,12 @@
*/
*/
class
NodeNewComments
extends
Numeric
{
class
NodeNewComments
extends
Numeric
{
public
function
construct
()
{
/**
parent
::
construct
();
* Constructs a NodeNewComments object.
*/
public
function
__construct
(
array
$configuration
,
$plugin_id
,
DiscoveryInterface
$discovery
)
{
parent
::
__construct
(
$configuration
,
$plugin_id
,
$discovery
);
$this
->
additional_fields
[
'nid'
]
=
'nid'
;
$this
->
additional_fields
[
'nid'
]
=
'nid'
;
$this
->
additional_fields
[
'type'
]
=
'type'
;
$this
->
additional_fields
[
'type'
]
=
'type'
;
$this
->
additional_fields
[
'comment_count'
]
=
array
(
'table'
=>
'node_comment_statistics'
,
'field'
=>
'comment_count'
);
$this
->
additional_fields
[
'comment_count'
]
=
array
(
'table'
=>
'node_comment_statistics'
,
'field'
=>
'comment_count'
);
...
...
lib/Views/filter/Plugin/views/field/FormatName.php
View file @
3b3e139c
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
use
Drupal\views\Plugin\views\field\FieldPluginBase
;
use
Drupal\views\Plugin\views\field\FieldPluginBase
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Component\Plugin\Discovery\DiscoveryInterface
;
/**
/**
* Field handler to output the name of an input format.
* Field handler to output the name of an input format.
...
@@ -22,8 +23,12 @@
...
@@ -22,8 +23,12 @@
*/
*/
class
FormatName
extends
FieldPluginBase
{
class
FormatName
extends
FieldPluginBase
{
public
function
construct
()
{
/**
parent
::
construct
();
* Constructs a FormatName object.
*/
public
function
__construct
(
array
$configuration
,
$plugin_id
,
DiscoveryInterface
$discovery
)
{
parent
::
__construct
(
$configuration
,
$plugin_id
,
$discovery
);
// Be explicit about the table we are using.
// Be explicit about the table we are using.
$this
->
additional_fields
[
'name'
]
=
array
(
'table'
=>
'filter_formats'
,
'field'
=>
'name'
);
$this
->
additional_fields
[
'name'
]
=
array
(
'table'
=>
'filter_formats'
,
'field'
=>
'name'
);
}
}
...
...
lib/Views/locale/Plugin/views/field/LinkEdit.php
View file @
3b3e139c
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
use
Drupal\views\Plugin\views\field\FieldPluginBase
;
use
Drupal\views\Plugin\views\field\FieldPluginBase
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Component\Plugin\Discovery\DiscoveryInterface
;
/**
/**
* Field handler to present a link to edit a translation.
* Field handler to present a link to edit a translation.
...
@@ -22,8 +23,12 @@
...
@@ -22,8 +23,12 @@
*/
*/
class
LinkEdit
extends
FieldPluginBase
{
class
LinkEdit
extends
FieldPluginBase
{
public
function
construct
()
{
/**
parent
::
construct
();
* Constructs a LinkEdit object.
*/
public
function
__construct
(
array
$configuration
,
$plugin_id
,
DiscoveryInterface
$discovery
)
{
parent
::
__construct
(
$configuration
,
$plugin_id
,
$discovery
);
$this
->
additional_fields
[
'lid'
]
=
'lid'
;
$this
->
additional_fields
[
'lid'
]
=
'lid'
;
}
}
...
...
lib/Views/node/Plugin/views/argument/CreatedDay.php
View file @
3b3e139c
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\views\Plugin\views\argument\Date
;
use
Drupal\views\Plugin\views\argument\Date
;
use
Drupal\Component\Plugin\Discovery\DiscoveryInterface
;
/**
/**
* Argument handler for a day (DD)
* Argument handler for a day (DD)
...
@@ -21,10 +22,11 @@
...
@@ -21,10 +22,11 @@
class
CreatedDay
extends
Date
{
class
CreatedDay
extends
Date
{
/**
/**
* Construct
or implementation
* Construct
s a CreatedDay object.
*/
*/
public
function
construct
()
{
public
function
__construct
(
array
$configuration
,
$plugin_id
,
DiscoveryInterface
$discovery
)
{
parent
::
construct
();
parent
::
__construct
(
$configuration
,
$plugin_id
,
$discovery
);
$this
->
formula
=
views_date_sql_extract
(
'DAY'
,
"***table***.
$this->realField
"
);
$this
->
formula
=
views_date_sql_extract
(
'DAY'
,
"***table***.
$this->realField
"
);
$this
->
format
=
'j'
;
$this
->
format
=
'j'
;
$this
->
arg_format
=
'd'
;
$this
->
arg_format
=
'd'
;
...
...
lib/Views/node/Plugin/views/argument/CreatedFullDate.php
View file @
3b3e139c
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\views\Plugin\views\argument\Date
;
use
Drupal\views\Plugin\views\argument\Date
;
use
Drupal\Component\Plugin\Discovery\DiscoveryInterface
;
/**
/**
* Argument handler for a full date (CCYYMMDD)
* Argument handler for a full date (CCYYMMDD)
...
@@ -21,10 +22,11 @@
...
@@ -21,10 +22,11 @@
class
CreatedFullDate
extends
Date
{
class
CreatedFullDate
extends
Date
{
/**
/**
* Construct
or implementation
* Construct
s a CreatedFullDate object.
*/
*/
public
function
construct
()
{
public
function
__construct
(
array
$configuration
,
$plugin_id
,
DiscoveryInterface
$discovery
)
{
parent
::
construct
();
parent
::
__construct
(
$configuration
,
$plugin_id
,
$discovery
);
$this
->
format
=
'F j, Y'
;
$this
->
format
=
'F j, Y'
;
$this
->
arg_format
=
'Ymd'
;
$this
->
arg_format
=
'Ymd'
;
$this
->
formula
=
views_date_sql_format
(
$this
->
arg_format
,
"***table***.
$this->realField
"
);
$this
->
formula
=
views_date_sql_format
(
$this
->
arg_format
,
"***table***.
$this->realField
"
);
...
...
lib/Views/node/Plugin/views/argument/CreatedMonth.php
View file @
3b3e139c
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\views\Plugin\views\argument\Date
;
use
Drupal\views\Plugin\views\argument\Date
;
use
Drupal\Component\Plugin\Discovery\DiscoveryInterface
;
/**
/**
* Argument handler for a month (MM)
* Argument handler for a month (MM)
...
@@ -21,10 +22,11 @@
...
@@ -21,10 +22,11 @@
class
CreatedMonth
extends
Date
{
class
CreatedMonth
extends
Date
{
/**
/**
* Construct
or implementation
* Construct
s a CreatedMonth object.
*/
*/
public
function
construct
()
{
public
function
__construct
(
array
$configuration
,
$plugin_id
,
DiscoveryInterface
$discovery
)
{
parent
::
construct
();
parent
::
__construct
(
$configuration
,
$plugin_id
,
$discovery
);
$this
->
formula
=
views_date_sql_extract
(
'MONTH'
,
"***table***.
$this->realField
"
);
$this
->
formula
=
views_date_sql_extract
(
'MONTH'
,
"***table***.
$this->realField
"
);
$this
->
format
=
'F'
;
$this
->
format
=
'F'
;
$this
->
arg_format
=
'm'
;
$this
->
arg_format
=
'm'
;
...
...
lib/Views/node/Plugin/views/argument/CreatedWeek.php
View file @
3b3e139c
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\views\Plugin\views\argument\Date
;
use
Drupal\views\Plugin\views\argument\Date
;
use
Drupal\Component\Plugin\Discovery\DiscoveryInterface
;
/**
/**
* Argument handler for a week.
* Argument handler for a week.
...
@@ -21,10 +22,11 @@
...
@@ -21,10 +22,11 @@
class
CreatedWeek
extends
Date
{
class
CreatedWeek
extends
Date
{
/**
/**
* Construct
or implementation
* Construct
s a CreatedWeek object.
*/
*/
public
function
construct
()
{
public
function
__construct
(
array
$configuration
,
$plugin_id
,
DiscoveryInterface
$discovery
)
{
parent
::
construct
();
parent
::
__construct
(
$configuration
,
$plugin_id
,
$discovery
);
$this
->
arg_format
=
'w'
;
$this
->
arg_format
=
'w'
;
$this
->
formula
=
views_date_sql_extract
(
'WEEK'
,
"***table***.
$this->realField
"
);
$this
->
formula
=
views_date_sql_extract
(
'WEEK'
,
"***table***.
$this->realField
"
);
}
}
...
...
lib/Views/node/Plugin/views/argument/CreatedYear.php
View file @
3b3e139c
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\views\Plugin\views\argument\Date
;
use
Drupal\views\Plugin\views\argument\Date
;
use
Drupal\Component\Plugin\Discovery\DiscoveryInterface
;
/**
/**
* Argument handler for a year (CCYY)
* Argument handler for a year (CCYY)
...
@@ -21,10 +22,11 @@
...
@@ -21,10 +22,11 @@
class
CreatedYear
extends
Date
{
class
CreatedYear
extends
Date
{
/**
/**
* Construct
or implementation
* Construct
s a CreatedYear object.
*/
*/
public
function
construct
()
{
public
function
__construct
(
array
$configuration
,
$plugin_id
,
DiscoveryInterface
$discovery
)
{
parent
::
construct
();
parent
::
__construct
(
$configuration
,
$plugin_id
,
$discovery
);
$this
->
arg_format
=
'Y'
;
$this
->
arg_format
=
'Y'
;
$this
->
formula
=
views_date_sql_extract
(
'YEAR'
,
"***table***.
$this->realField
"
);
$this
->
formula
=
views_date_sql_extract
(
'YEAR'
,
"***table***.
$this->realField
"
);
}
}
...
...
lib/Views/node/Plugin/views/argument/CreatedYearMonth.php
View file @
3b3e139c
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\Core\Annotation\Plugin
;
use
Drupal\views\Plugin\views\argument\Date
;
use
Drupal\views\Plugin\views\argument\Date
;
use
Drupal\Component\Plugin\Discovery\DiscoveryInterface
;
/**
/**
* Argument handler for a year plus month (CCYYMM)
* Argument handler for a year plus month (CCYYMM)
...
@@ -21,10 +22,11 @@
...
@@ -21,10 +22,11 @@
class
CreatedYearMonth
extends
Date
{
class
CreatedYearMonth
extends
Date
{
/**
/**
* Construct
or implementation
* Construct
s a CreatedYearMonth object.
*/
*/
public
function
construct
()
{
public
function
__construct
(
array
$configuration
,
$plugin_id
,
DiscoveryInterface
$discovery
)
{
parent
::
construct
();