diff --git a/file_entity.module b/file_entity.module index e9dcd26..b60904a 100644 --- a/file_entity.module +++ b/file_entity.module @@ -805,3 +805,21 @@ function theme_file_entity_file_link($variables) { return '' . $icon . ' ' . l($link_text, $url, $options) . ''; } + +/** + * Implements hook_entity_property_info(). + */ +function file_entity_entity_property_info() { + $info['file']['properties']['type'] = array( + 'label' => t("File type"), + 'type' => 'token', + 'description' => t("The type of the file."), + 'setter callback' => 'entity_property_verbatim_set', + 'setter permission' => 'administer files', + 'options list' => 'file_type_get_names', + 'required' => TRUE, + 'schema field' => 'type', + ); + + return $info; +}