You are here

abstract class ContentBlockBase in Open Social 10.3.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_content_block/src/ContentBlockBase.php \Drupal\social_content_block\ContentBlockBase
  2. 8.8 modules/social_features/social_content_block/src/ContentBlockBase.php \Drupal\social_content_block\ContentBlockBase
  3. 10.0.x modules/social_features/social_content_block/src/ContentBlockBase.php \Drupal\social_content_block\ContentBlockBase
  4. 10.1.x modules/social_features/social_content_block/src/ContentBlockBase.php \Drupal\social_content_block\ContentBlockBase
  5. 10.2.x modules/social_features/social_content_block/src/ContentBlockBase.php \Drupal\social_content_block\ContentBlockBase

Defines a base content block implementation.

This abstract class provides a method for inserting additional filters to the base query of the "Custom content list block" custom block.

Hierarchy

Expanded class hierarchy of ContentBlockBase

5 files declare their use of ContentBlockBase
BookContentBlock.php in modules/social_features/social_content_block/modules/social_book_content_block/src/Plugin/ContentBlock/BookContentBlock.php
EventContentBlock.php in modules/social_features/social_content_block/modules/social_event_content_block/src/Plugin/ContentBlock/EventContentBlock.php
GroupContentBlock.php in modules/social_features/social_content_block/modules/social_group_content_block/src/Plugin/ContentBlock/GroupContentBlock.php
PageContentBlock.php in modules/social_features/social_content_block/modules/social_page_content_block/src/Plugin/ContentBlock/PageContentBlock.php
TopicContentBlock.php in modules/social_features/social_content_block/src/Plugin/ContentBlock/TopicContentBlock.php

File

modules/social_features/social_content_block/src/ContentBlockBase.php, line 15

Namespace

Drupal\social_content_block
View source
abstract class ContentBlockBase extends PluginBase implements ContentBlockPluginInterface {

  /**
   * {@inheritdoc}
   */
  public function supportedSortOptions() : array {
    return [
      'created' => 'Last created',
      'changed' => 'Last updated',
      'most_commented' => 'Most commented',
      'most_liked' => 'Most liked',
      'last_interacted' => 'Last interacted',
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ContentBlockBase::supportedSortOptions public function The sort options that are supported for this content block type. Overrides ContentBlockPluginInterface::supportedSortOptions 1
ContentBlockPluginInterface::query public function Create filtering query. 5
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 2
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.
PluginBase::__construct public function Constructs a \Drupal\Component\Plugin\PluginBase object. 98