When implementing a display extender, I get the following PHP strict warning:
Declaration of views_metatags_plugin_display_extender_metatags::option_definition() should be compatible with that of views_object::option_definition()
Sure enough, there is a mismatch.
views_plugin_display:
function option_definition() {
views_plugin_display_extender:
function options_definition(&$options) { }
So either we need to change the base definition of options_definition() or we use a different callback (e.g. options_definition_alter()). This is one of the reasons why I started investigating using drupal_alters() would be easier.
Comment | File | Size | Author |
---|---|---|---|
#11 | views-1281698-9.patch | 1.13 KB | tim.plunkett |
#8 | views-1281698-8.patch | 977 bytes | tim.plunkett |
Comments
Comment #1
Dave ReidThis blocks metatags views integration.
Comment #2
dawehnerWouldn't
work as well?
Comment #3
Dave ReidMaking a parameter by reference also triggers this warning though.
Comment #4
dawehnerWhat do you think about renaming it to options_definition_alter. /me ducks
Alternative the code which runs the methods could merge together the $options.
Comment #5
Chi CreditAttribution: Chi commentedThere is relative issue: #1347904: Strict warning: Declaration of cpv_plugin_display_extender_code
Comment #6
beatnbite CreditAttribution: beatnbite commentedThe metatag views integration is an important thing.
Is there any progress on this issue?
Comment #7
dawehnerThere are several possible ways to do it
a) @ before the function call
b) setting the options in the display plugin object like $object->options and allow to alter it from the display plugin
c) Rename it see #4
In general all seems to be quite hacky.
Comment #8
tim.plunkettDiscussed this with dereine in IRC
Comment #9
dawehnerThanks! This would probably require a backport as well
Comment #10
dawehnerWrong status
Comment #11
tim.plunkettAfter further thought, both methods should be available.
The first to define options the plugin is directly responsible, the other to alter existing options.
Comment #12
dawehnerSetting back after some discussion
Comment #13
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe Drupal 6 branch is no longer supported, please check with the D6LTS project if you need further support. For more information as to why this issue was closed, please see issue #3030347: Plan to clean process issue queue