You are here

EntityBrowserSelectionDisplay.php in Entity Browser 8

Same filename and directory in other branches
  1. 8.2 src/Annotation/EntityBrowserSelectionDisplay.php

File

src/Annotation/EntityBrowserSelectionDisplay.php
View source
<?php

namespace Drupal\entity_browser\Annotation;

use Drupal\Component\Annotation\Plugin;

/**
 * Defines an entity browser selection display annotation object.
 *
 * @see hook_entity_browser_selection_display_info_alter()
 *
 * @Annotation
 */
class EntityBrowserSelectionDisplay extends Plugin {

  /**
   * The plugin ID.
   *
   * @var string
   */
  public $id;

  /**
   * The human-readable name of the selection display.
   *
   * @var \Drupal\Core\Annotation\Translation
   *
   * @ingroup plugin_translatable
   */
  public $label;

  /**
   * A brief description of the selection display.
   *
   * This will be shown when adding or configuring this selection display.
   *
   * @var \Drupal\Core\Annotation\Translation
   *
   * @ingroup plugin_translatable
   */
  public $description = '';

  /**
   * Preselection support.
   *
   * This will be used by entity browser form element to check, if selection
   * display accepts preselection of entities.
   *
   * @var bool
   */
  public $acceptPreselection = FALSE;

  /**
   * Indicates that javascript commands can be executed for Selection display.
   *
   * Currently supported javascript commands are adding and removing selection
   * from selection display. Javascript commands use Ajax requests to load
   * relevant changes and makes user experience way better, becase form is not
   * flashed every time.
   *
   * @var bool
   */
  public $js_commands = FALSE;

}

Classes

Namesort descending Description
EntityBrowserSelectionDisplay Defines an entity browser selection display annotation object.