Skip to content

Commit

Permalink
MDL-64820 external: add isimage to stored_file exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanwyllie committed Mar 22, 2019
1 parent 432cdac commit a307a47
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions files/classes/external/stored_file_exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public function __construct(stored_file $file, $related = array()) {
$data->filepath = $file->get_filepath();
$data->filename = $file->get_filename();
$data->isdir = $file->is_directory();
$data->isimage = $file->is_valid_image();
$data->timemodified = $file->get_timemodified();
$data->timecreated = $file->get_timecreated();
$data->filesize = $file->get_filesize();
Expand Down Expand Up @@ -94,6 +95,9 @@ protected static function define_properties() {
'isdir' => array(
'type' => PARAM_BOOL
),
'isimage' => array(
'type' => PARAM_BOOL
),
'timemodified' => array(
'type' => PARAM_INT
),
Expand Down

0 comments on commit a307a47

Please sign in to comment.