<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
class Core_Model_Adphoto extends Core_Model_Item_Abstract
{
  protected $_searchTriggers = false;

  public function getPhotoUrl($type = null)
  {
    if( empty($this->file_id) ) {
      return "no file id";
    }

    $file = Engine_Api::_()->getItemTable('storage_file')->getFile($this->file_id, $type);
    if( !$file ) {
      return "no file";
    }

    return $file->map();
  }
}
