You are here

public function MediaInternetBaseHandler::save in D7 Media 7.4

Same name and namespace in other branches
  1. 7 modules/media_internet/includes/MediaInternetBaseHandler.inc \MediaInternetBaseHandler::save()
  2. 7.2 modules/media_internet/includes/MediaInternetBaseHandler.inc \MediaInternetBaseHandler::save()
  3. 7.3 modules/media_internet/includes/MediaInternetBaseHandler.inc \MediaInternetBaseHandler::save()

Saves a file to the file_managed table (with file_save).

Return value

StdClass

File

modules/media_internet/includes/MediaInternetBaseHandler.inc, line 62
Definition of MediaInternetBaseHandler.

Class

MediaInternetBaseHandler
A base class for managing the addition of Internet media.

Code

public function save() {
  $file_obj = $this
    ->getFileObject();
  $this
    ->preSave($file_obj);
  file_save($file_obj);
  $this
    ->postSave($file_obj);
  return $file_obj;
}