You are here

ActivityPreview.php in CRM Core 8

File

modules/crm_core_activity/src/Plugin/views/field/ActivityPreview.php
View source
<?php

namespace Drupal\crm_core_activity\Plugin\views\field;

use Drupal\views\Plugin\views\field\FieldPluginBase;
use Drupal\views\ResultRow;

/**
 * Field handler to present the preview for the activity.
 *
 * @ingroup views_field_handlers
 *
 * @ViewsField("activity_preview")
 */
class ActivityPreview extends FieldPluginBase {

  /**
   * {@inheritdoc}
   */
  public function render(ResultRow $values) {
    return $this
      ->getEntity($values)->type->entity
      ->getPlugin()
      ->display($this
      ->getEntity($values));
  }

}

Classes

Namesort descending Description
ActivityPreview Field handler to present the preview for the activity.