Skip to content

Instantly share code, notes, and snippets.

@scottalan
Created March 3, 2014 21:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottalan/9335285 to your computer and use it in GitHub Desktop.
Save scottalan/9335285 to your computer and use it in GitHub Desktop.
oa_worktracker, oa_panopoly_users, panopoly_users - Issues with overriding features.
<?php
// If OA Worktracker adds 'new-7e2787f8-3f6c-4b3b-a1bb-e11225e395d5' to the array of
// '$data['user:user:default']->display->panels['contentheader']' then it's in a good state.
// NOTE: I am just adding these changes manually.
/**
* Implements hook_panelizer_defaults_override_alter().
*/
function oa_worktracker_panelizer_defaults_override_alter(&$data) {
if (isset($data['user:user:default'])) {
$data['user:user:default']->display->content['new-7e2787f8-3f6c-4b3b-a1bb-e11225e395d5'] = (object) array(
'pid' => 'new-7e2787f8-3f6c-4b3b-a1bb-e11225e395d5',
'panel' => 'contentheader',
'type' => 'views_panes',
'subtype' => 'oa_worktracker-user_tasks',
'shown' => TRUE,
'access' => array(),
'configuration' => array(
'show_exposed_form' => 1,
'items_per_page' => 10,
'fields_override' => array(
'timestamp' => 0,
'title' => 1,
'realname_1' => 0,
'realname' => 0,
'title_1' => 1,
'field_oa_worktracker_priority' => 1,
'field_oa_worktracker_task_type' => 1,
'field_oa_worktracker_task_status' => 1,
'comment_count' => 1,
'last_updated' => 1,
),
'exposed' => array(
'field_oa_worktracker_task_status_value' => array(),
'field_oa_worktracker_priority_value' => array(),
'field_oa_worktracker_task_type_value' => array(),
'widget_title' => 'Your Tasks',
'sort_by' => NULL,
'sort_order' => NULL,
),
'override_title' => '',
'override_title_text' => '',
'view_mode' => 'teaser',
'widget_title' => 'Your Tasks',
'use_pager' => NULL,
'pager_id' => NULL,
'offset' => NULL,
'link_to_view' => NULL,
'more_link' => NULL,
'path' => NULL,
'view_settings' => 'fields',
'header_type' => 'none',
'context' => array(
0 => 'panelizer',
),
),
'cache' => array(),
'style' => '',
'css' => array(),
'extras' => array(),
'position' => 3,
'locks' => array(),
'uuid' => '7e2787f8-3f6c-4b3b-a1bb-e11225e395d5',
); /* WAS: '' */
$data['user:user:default']->display->panels['contentheader'] = array(
0 => 'new-7e2787f8-3f6c-4b3b-a1bb-e11225e395d5',
1 => 'new-a617e554-6ad7-4d25-9d89-627d130d8be3',
2 => 'new-d3a2a9fb-f88a-4730-bfab-c36f4e0af395',
3 => 'new-faf0ad46-b575-4f96-874d-9a4548cc8da3',
); /* WAS: '' */
}
}
// @see - https://gist.github.com/scottalan/9335254 - for a drush fd of 'panoply_users' and 'oa_panopoly_users'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment