You are here

DataProviderInterface.php in Gutenberg 8

Same filename and directory in other branches
  1. 8.2 src/DataProvider/DataProviderInterface.php

File

src/DataProvider/DataProviderInterface.php
View source
<?php

namespace Drupal\gutenberg\DataProvider;

use Drupal\Core\Entity\ContentEntityInterface;

/**
 * Provides data for entity type.
 *
 * @package Drupal\gutenberg\DataProvider
 */
interface DataProviderInterface {

  /**
   * Returns array data.
   *
   * @param \Drupal\Core\Entity\ContentEntityInterface $entity
   *   Entity instance to process.
   * @param array $data
   *   Array of additional data to process.
   *
   * @return array
   *   The array data.
   */
  public function getData(ContentEntityInterface $entity, array $data = []);

}

Interfaces

Namesort descending Description
DataProviderInterface Provides data for entity type.