function AggregatorFeedBlock::create

Same name in other branches
  1. 8.9.x core/modules/aggregator/src/Plugin/Block/AggregatorFeedBlock.php \Drupal\aggregator\Plugin\Block\AggregatorFeedBlock::create()

Overrides ContainerFactoryPluginInterface::create

File

core/modules/aggregator/src/Plugin/Block/AggregatorFeedBlock.php, line 63

Class

AggregatorFeedBlock
Provides an 'Aggregator feed' block with the latest items from the feed.

Namespace

Drupal\aggregator\Plugin\Block

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
    return new static($configuration, $plugin_id, $plugin_definition, $container->get('entity_type.manager')
        ->getStorage('aggregator_feed'), $container->get('entity_type.manager')
        ->getStorage('aggregator_item'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.