src/MediaTrait.php
private function getTitle() {
    if (!is_null($this->options->title)) {
      return $this->options->title;
    }

    if (!is_null($this->media)) {
      return $this->media->title;
    }

    return '';
  }
private function getTitle() {
    if (!is_null($this->options->title)) {
      return $this->options->title;
    }

    if (!is_null($this->media)) {
      return $this->media->title;
    }

    return '';
  }
Get the Title text for the file, from options, then from db, otherwise ''

@return string
The Title text