Hi,
I tried creating a custom display plugin for views, that would be treated like a view panels pane. So I extended views_content_plugin_display_panel_pane, I was able to get my plugin working, but panels did not treat it like view pane rather a regular view display. I tracked it down to this line of

function _views_content_panes_content_type($view, $display) {
  // Ensure the handler is the right type, as Views will fall back to
  // the default display if something is broken:
 if (get_class($display->handler) != 'views_content_plugin_display_panel_pane') {
    return;
  }

Changing that to

function _views_content_panes_content_type($view, $display) {
  // Ensure the handler is the right type, as Views will fall back to
  // the default display if something is broken:
  if (!is_a($display->handler, 'views_content_plugin_display_panel_pane')) {
    return;
  }

Allowed my new plugin to be treated like view pane.

Comments

iamjon’s picture

StatusFileSize
new729 bytes

Patch

iamjon’s picture

StatusFileSize
new729 bytes

Removed space

merlinofchaos’s picture

Status: Active » Needs review

Setting proper status.

miroslavbanov’s picture

Status: Needs review » Reviewed & tested by the community

It works great. Without it, you don't see the overriden/extended view pane as a ctools content in the "View panes" tab or anywhere else in a panel.

japerry’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed
miroslavbanov’s picture

Status: Fixed » Needs work
Issue tags: +E_STRICT

Apparently, this would produce errors on php 5.4
http://www.php.net/manual/en/function.is-a.php
5.0.0 This function became deprecated in favour of the instanceof operator. Calling this function will result in an E_STRICT warning.
http://www.php.net/manual/en/function.error-reporting.php
5.4.0 E_STRICT became part of E_ALL.

iamjon’s picture

It seems this function is still valid for php 5.4. I'll test in a second to confirm.

http://il1.php.net/is_a

Changelog ¶
Version Description
5.3.9 Added allow_string parameter
5.3.0 This function is no longer deprecated, and will therefore no longer throw E_STRICT warnings.
5.0.0 This function became deprecated in favour of the instanceof operator. Calling this function will result in an E_STRICT warning.

japerry’s picture

Status: Needs work » Fixed

Re-marking fixed.

It looks like it might throw an error with php 5.2, but we no longer support 5.2 so thats okay.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.