You are here

class Photosets in Flickr 8

Class Photosets.

@package Drupal\flickr\Service

Hierarchy

Expanded class hierarchy of Photosets

1 file declares its use of Photosets
FlickrFilter.php in modules/flickr_filter/src/Plugin/Filter/FlickrFilter.php
1 string reference to 'Photosets'
flickr.services.yml in ./flickr.services.yml
flickr.services.yml
1 service uses Photosets
flickr.photosets in ./flickr.services.yml
Drupal\flickr\Service\Photosets

File

src/Service/Photosets.php, line 13

Namespace

Drupal\flickr\Service
View source
class Photosets {

  /**
   * Photosets constructor.
   *
   * @param \Drupal\flickr_api\Service\Photosets $flickrApiPhotosets
   *   API Photosets.
   * @param \Drupal\flickr\Service\Photos $photos
   *   Photos.
   * @param \Drupal\flickr\Service\Helpers $helpers
   *   Helpers.
   * @param \Drupal\flickr_api\Service\Helpers $flickrApiHelpers
   *   API Helpers.
   */
  public function __construct(FlickrApiPhotosets $flickrApiPhotosets, Photos $photos, Helpers $helpers, FlickrApiHelpers $flickrApiHelpers) {

    // Flickr API Photosets.
    $this->flickrApiPhotosets = $flickrApiPhotosets;

    // Flickr Photos.
    $this->photos = $photos;

    // Flickr Helpers.
    $this->helpers = $helpers;

    // Flickr API Helpers.
    $this->flickrApiHelpers = $flickrApiHelpers;
  }

  /**
   * Theme Photos.
   *
   * @param array $photos
   *   Photos.
   * @param string $title
   *   Title.
   *
   * @return array
   *   Theme Array.
   */
  public function themePhotoset(array $photos, $title) {
    return [
      '#theme' => 'flickr_photoset',
      '#photos' => $photos,
      '#title' => $title,
      '#attached' => [
        'library' => [
          'flickr/flickr.stylez',
        ],
      ],
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Photosets::themePhotoset public function Theme Photos.
Photosets::__construct public function Photosets constructor.