You are here

class RedhenOrgViewsController in RedHen CRM 7

Controls views integration for Redhen organizations

Hierarchy

Expanded class hierarchy of RedhenOrgViewsController

1 string reference to 'RedhenOrgViewsController'
redhen_org_entity_info in modules/redhen_org/redhen_org.module
Implements hook_entity_info().

File

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

View source
class RedhenOrgViewsController extends EntityDefaultViewsController {

  /**
   * Defines the result for hook_views_data().
   */
  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;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EntityDefaultViewsController::$type protected property
EntityDefaultViewsController::getRelationshipHandlerClass public function Determines the handler to use for a relationship to an entity type.
EntityDefaultViewsController::map_from_schema_info protected function Comes up with views information based on the given schema and property info.
EntityDefaultViewsController::optionsListCallback public static function A callback returning property options, suitable to be used as views options callback.
EntityDefaultViewsController::schema_fields protected function Try to come up with some views fields with the help of the schema and the entity property information.
EntityDefaultViewsController::schema_revision_fields protected function Try to come up with some views fields with the help of the revision schema and the entity property information.
EntityDefaultViewsController::__construct public function
RedhenOrgViewsController::views_data public function Defines the result for hook_views_data(). Overrides EntityDefaultViewsController::views_data