You are here

public function elFinderDrupal::__construct in elFinder file manager 7.2

Same name and namespace in other branches
  1. 6.2 inc/elfinder.drupal.inc \elFinderDrupal::__construct()
  2. 7.3 inc/elfinder.drupal.inc \elFinderDrupal::__construct()

File

inc/elfinder.drupal.inc, line 9
elFinder conenctor class

Class

elFinderDrupal
@file

Code

public function __construct($opts) {
  if (is_callable(array(
    $this,
    'version',
  ))) {
    $ver = floatval($this
      ->version());
    if (isset(elFinder::$ApiVersion)) {
      $ver = elFinder::$ApiVersion;
    }
    if ($ver == 2.1 && is_callable(array(
      $this,
      'revision',
    )) && $this
      ->revision() < 37) {
      $this
        ->connector_unsupported_error();
    }
    parent::__construct($opts);
    $this->commands['desc'] = array(
      'target' => TRUE,
      'content' => FALSE,
    );
    $this->commands['owner'] = array(
      'target' => TRUE,
      'content' => FALSE,
    );
    $this->commands['downloadcount'] = array(
      'target' => TRUE,
    );
  }
  else {
    $this
      ->connector_unsupported_error();
  }
}