class TitleSlide in Views TimelineJS integration 8.3
Defines a TimelineJS3 title slide.
Hierarchy
- class \Drupal\views_timelinejs\TimelineJS\Slide implements SlideInterface- class \Drupal\views_timelinejs\TimelineJS\TitleSlide
 
Expanded class hierarchy of TitleSlide
1 file declares its use of TitleSlide
- TimelineJS.php in src/Plugin/ views/ style/ TimelineJS.php 
File
- src/TimelineJS/ TitleSlide.php, line 8 
Namespace
Drupal\views_timelinejs\TimelineJSView source
class TitleSlide extends Slide {
  /**
   * Constructs a new TitleSlide object.
   *
   * @param \Drupal\views_timelinejs\TimelineJS\TextInterface|null $text
   *   Text to display on the title slide.
   */
  public function __construct(TextInterface $text = NULL) {
    if (!empty($text)) {
      $this->text = $text;
    }
  }
  /**
   * {@inheritdoc}
   */
  public function buildArray() {
    $slide = [];
    if (!empty($this->text)) {
      $slide['text'] = $this->text
        ->buildArray();
    }
    if (!empty($this->media)) {
      $slide['media'] = $this->media
        ->buildArray();
    }
    if (!empty($this->background)) {
      $slide['background'] = $this->background
        ->buildArray();
    }
    if (!$this->autolink) {
      $slide['autolink'] = FALSE;
    }
    if (!empty($this->uniqueId)) {
      $slide['unique_id'] = $this->uniqueId;
    }
    // Filter any empty values before returning.
    return array_filter($slide);
  }
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| Slide:: | protected | property | The slide autolink property. | |
| Slide:: | protected | property | The slide background url and color. | |
| Slide:: | protected | property | The slide display date. | |
| Slide:: | protected | property | The slide end date. | |
| Slide:: | protected | property | The slide group. | |
| Slide:: | protected | property | The slide media and its metadata. | |
| Slide:: | protected | property | The slide start date. | |
| Slide:: | protected | property | The slide headline and text. | |
| Slide:: | protected | property | The slide unique id. | |
| Slide:: | public | function | Sets the slide's autolink property to FALSE. Overrides SlideInterface:: | |
| Slide:: | public | function | Sets the slide's autolink property to TRUE. Overrides SlideInterface:: | |
| Slide:: | public | function | Sets the background for this slide. Overrides SlideInterface:: | |
| Slide:: | public | function | Sets the display date for this slide. Overrides SlideInterface:: | |
| Slide:: | public | function | Sets the group for this slide. Overrides SlideInterface:: | |
| Slide:: | public | function | Sets the media for this slide. Overrides SlideInterface:: | |
| Slide:: | public | function | Sets the unique ID for this slide. Overrides SlideInterface:: | |
| TitleSlide:: | public | function | Creates an array representing the TimelineJS javascript object. Overrides Slide:: | |
| TitleSlide:: | public | function | Constructs a new TitleSlide object. Overrides Slide:: | 
