You are here

class drupal in Video 6.5

Same name and namespace in other branches
  1. 6.4 filesystem/drupal.inc \drupal

Hierarchy

Expanded class hierarchy of drupal

4 string references to 'drupal'
video_filesystem_admin_settings in ./video.admin.inc
File system admin settings
video_get_filesystem in ./video.module
Get file system instance
video_zencoder::admin_settings_validate in plugins/video_zencoder/transcoders/video_zencoder.inc
_video_s3_is_active_fs in plugins/video_s3/video_s3.module

File

filesystem/drupal.inc, line 10
Definition of drupal.

View source
class drupal implements video_filesystem {
  protected $params = array();
  protected $name = 'Drupal file system';
  protected $value = 'drupal';
  public function __construct() {
  }
  public function load_file(stdClass $video) {
  }
  public function get_name() {
    return $this->name;
  }
  public function get_help() {
    return l(t('Drupal file system'), 'admin/settings/file-system');
  }
  public function get_value() {
    return $this->value;
  }
  public function admin_settings(&$form_state) {
    return array();
  }
  public function admin_settings_validate($form, &$form_state) {
  }
  public function onpreconvert(stdClass $video) {
    return TRUE;
  }
  public function onpostconvert(stdClass $video) {
    return TRUE;
  }
  public function delete_video(stdClass $video) {

    // The original file is deleted by the filefield module
    // Delete the locally converted videos
    if (!empty($video->data)) {
      foreach ($video->data as $file) {
        file_delete($file->filepath);
      }
    }

    // Delete our video thumbnails and folder.
    $thumb_folder = video_thumb_path($video, FALSE);

    // Recursively delete our folder and files.
    if (is_dir($thumb_folder)) {
      rmdirr($thumb_folder);

      // Delete any entries in the files table that may refer to the above path.
      db_query('DELETE FROM {files} WHERE filepath LIKE "%b%%"', strtr(db_escape_string($thumb_folder), array(
        '%' => '\\%',
        '_' => '\\_',
      )));
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
drupal::$name protected property
drupal::$params protected property
drupal::$value protected property
drupal::admin_settings public function Overrides video_plugin::admin_settings
drupal::admin_settings_validate public function Overrides video_plugin::admin_settings_validate
drupal::delete_video public function Delete the video from the file system. Overrides video_filesystem::delete_video
drupal::get_help public function Overrides video_plugin::get_help
drupal::get_name public function Overrides video_plugin::get_name
drupal::get_value public function Overrides video_plugin::get_value
drupal::load_file public function Process the given video in preparation for use on the front end. Overrides video_filesystem::load_file
drupal::onpostconvert public function Overrides video_filesystem::onpostconvert
drupal::onpreconvert public function Overrides video_filesystem::onpreconvert
drupal::__construct public function