You are here

ContentBlockPluginInterface.php in Open Social 8.8

File

modules/social_features/social_content_block/src/ContentBlockPluginInterface.php
View source
<?php

namespace Drupal\social_content_block;

use Drupal\Core\Database\Query\SelectInterface;

/**
 * Interface ContentBlockPluginInterface.
 *
 * @package Drupal\social_content_block
 */
interface ContentBlockPluginInterface {

  /**
   * Create filtering query.
   *
   * @param \Drupal\Core\Database\Query\SelectInterface $query
   *   The query.
   * @param array $fields
   *   The fields.
   */
  public function query(SelectInterface $query, array $fields);

  /**
   * The sort options that are supported for this content block type.
   *
   * Used to configure the sorting field storage as well as the content block
   * form.
   *
   * @return array
   *   An array with sorting option's system name as key and a human readable
   *   label as value.
   */
  public function supportedSortOptions() : array;

}

Interfaces

Namesort descending Description
ContentBlockPluginInterface Interface ContentBlockPluginInterface.