You are here

class InstagramPostsObtainedEvent in Instagram Feeds 8

En event occurs when instagram_feeds obtained posts from Instagram API.

Hierarchy

Expanded class hierarchy of InstagramPostsObtainedEvent

2 files declare their use of InstagramPostsObtainedEvent
CronHandler.php in src/CronHandler.php
InstagramPostsObtainedSubscriber.php in src/EventSubscriber/InstagramPostsObtainedSubscriber.php

File

src/Event/InstagramPostsObtainedEvent.php, line 11

Namespace

Drupal\instagram_feeds\Event
View source
class InstagramPostsObtainedEvent extends InstagramFeedsEventBase {

  /**
   * Instagram posts.
   *
   * @var array
   */
  public $posts;

  /**
   * Constructs the object.
   *
   * @param \Drupal\Core\Config\ImmutableConfig $configuration
   *   The Instagram feeds module settings.
   * @param \Drupal\instagram_feeds\Entity\InstagramAccountInterface $account
   *   The Instagram account.
   * @param array $posts
   *   The list of Instagram posts to modify.
   */
  public function __construct(ImmutableConfig $configuration, InstagramAccountInterface $account, array $posts) {
    parent::__construct($configuration, $account);
    $this->posts = $posts;
  }

  /**
   * {@inheritdoc}
   */
  public static function getEventName() : string {
    return 'instagram_feeds_posts_obtained';
  }

}

Members

Namesort descending Modifiers Type Description Overrides
InstagramFeedsEventBase::$account private property Instagram account.
InstagramFeedsEventBase::$config private property Instagram Feeds Config bucket.
InstagramFeedsEventBase::getAccount public function Gets related Instagram Account.
InstagramFeedsEventBase::getConfig public function Gets Instagram Feeds setting (except client_secret).
InstagramPostsObtainedEvent::$posts public property Instagram posts.
InstagramPostsObtainedEvent::getEventName public static function Returns event system name for dispatcher. Overrides InstagramFeedsEventBase::getEventName
InstagramPostsObtainedEvent::__construct public function Constructs the object. Overrides InstagramFeedsEventBase::__construct