You are here

BricksTreeRevisionedItem.php in Bricks​ 2.x

File

modules/bricks_revisions/src/Plugin/Field/FieldType/BricksTreeRevisionedItem.php
View source
<?php

namespace Drupal\bricks_revisions\Plugin\Field\FieldType;

use Drupal\bricks\BricksFieldItemInterface;
use Drupal\bricks\BricksFieldTypeTrait;
use Drupal\entity_reference_revisions\Plugin\Field\FieldType\EntityReferenceRevisionsItem;

/**
 * {@inheritdoc}
 *
 * @FieldType(
 *   id = "bricks_revisioned",
 *   label = @Translation("Bricks (revisioned)"),
 *   description = @Translation("An entity field containing a tree of revisioned entity reference bricks."),
 *   category = @Translation("Reference revisions"),
 *   default_widget = "bricks_tree_autocomplete",
 *   default_formatter = "bricks_nested",
 *   list_class = "\Drupal\Core\Field\EntityReferenceFieldItemList",
 * )
 */
class BricksTreeRevisionedItem extends EntityReferenceRevisionsItem implements BricksFieldItemInterface {
  use BricksFieldTypeTrait;

  /**
   * {@inheritdoc}
   */
  public static function getPreconfiguredOptions() {
    return [];
  }

}

Classes

Namesort descending Description
BricksTreeRevisionedItem Plugin annotation @FieldType( id = "bricks_revisioned", label = @Translation("Bricks (revisioned)"), description = @Translation("An entity field containing a tree of revisioned entity reference bricks."), category = @Translation("Reference…