You are here

public function RedhenOrgViewsController::views_data in RedHen CRM 7

Defines the result for hook_views_data().

Overrides EntityDefaultViewsController::views_data

File

modules/redhen_org/lib/redhen_org.views.inc, line 11

Class

RedhenOrgViewsController
Controls views integration for Redhen organizations

Code

public function views_data() {
  $data = parent::views_data();

  // View link.
  $data['redhen_org']['link'] = array(
    'title' => t('Link'),
    'help' => t('Provide a simple link to the RedHen Organization.'),
    'field' => array(
      'handler' => 'redhen_org_views_handler_field_redhen_org_link',
      'click sortable' => TRUE,
      'real field' => 'org_id',
      'additional fields' => array(
        'org_id',
      ),
    ),
  );

  // Edit link.
  $data['redhen_org']['edit'] = array(
    'title' => t('Edit link'),
    'help' => t('Provide a simple link to edit the RedHen Organization.'),
    'field' => array(
      'handler' => 'redhen_org_views_handler_field_redhen_org_link_edit',
      'click sortable' => TRUE,
      'real field' => 'org_id',
      'additional fields' => array(
        'org_id',
      ),
    ),
  );

  // Delete link.
  $data['redhen_org']['delete'] = array(
    'title' => t('Delete link'),
    'help' => t('Provide a simple link to delete the RedHen Organization.'),
    'field' => array(
      'handler' => 'redhen_org_views_handler_field_redhen_org_link_delete',
      'click sortable' => TRUE,
      'real field' => 'org_id',
      'additional fields' => array(
        'org_id',
      ),
    ),
  );
  return $data;
}