Skip to content

Adding new column to list view in 2.1

667bdrm edited this page Oct 30, 2018 · 4 revisions
  1. Implement statCorrector function to retrieve extra info and extend file stat. In this example used custom volume driver method:

public static function stat_corrector(&$stat, $path, $statOwner, $volumeDriveInstance) { $stat['owner'] = $volumeDriveInstance->MyOwnerFunction($volumeDriveInstance->encode($path)); }

  1. Add statCorrector parameter to the elFinder Connector initialization

'statCorrector' => 'elFinderVolumeMyCustom::stat_corrector',

  1. Add the new column before $.elfinder call in ui:

elFinder.prototype._options.uiOptions.cwd.listView.columns.push('owner'); elFinder.prototype._options.uiOptions.cwd.listView.columnsCustomName['owner'] = 'Owner';

Clone this wiki locally