You are here

ActivityTypePluginInterface.php in CRM Core 8.3

File

modules/crm_core_activity/src/ActivityTypePluginInterface.php
View source
<?php

namespace Drupal\crm_core_activity;

use Drupal\Component\Plugin\ConfigurableInterface;
use Drupal\Component\Plugin\DependentPluginInterface;

/**
 * Defines the interface for activity type plugins.
 */
interface ActivityTypePluginInterface extends ConfigurableInterface, DependentPluginInterface {

  /**
   * Displays the contents of the label field on the activity entity.
   *
   * @param \Drupal\crm_core_activity\ActivityInterface $entity
   *   The activity entity to build the label for.
   *
   * @return string
   *   Returns the entity label.
   */
  public function label(ActivityInterface $entity);

  /**
   * Returns visual representation of the activity in form of a render array.
   *
   * @param \Drupal\crm_core_activity\ActivityInterface $entity
   *   The activity entity to build the label for.
   *
   * @return array
   *   Visual representation of the activity in form of a render array.
   */
  public function display(ActivityInterface $entity);

}

Interfaces

Namesort descending Description
ActivityTypePluginInterface Defines the interface for activity type plugins.