Problem/Motivation

If there a lot of managed files on a site it may cause Feature creation page crash. Also it's difficult to select related files to some entity.

Proposed resolution

Create a "Usage" filter. It means to display only those files which are related to the entities selected on the UUID Features settings page. Then the setting page can be used as filter for available files options on the feature creation page.

Comments

oleksiy’s picture

oleksiy’s picture

Status: Active » Needs review
andypost’s picture

+++ b/includes/uuid_file_entity.features.inc
@@ -10,22 +10,47 @@
+  $entity_info = entity_get_info();
+  $enabled_types = array();
+  foreach ($entity_info['file']['bundles'] as $key => $value) {

would be great to add a comment about why we search for bundles...
Suppose without file_entity files has no bundles, so better to handle both cases.

oleksiy’s picture

StatusFileSize
new2.99 KB

File entity has a bundle named "file" even without file_entity module installed. Have checked it on clean Drupal installation.

andypost’s picture

Status: Needs review » Reviewed & tested by the community

Sure! So now the question to maintainer - long lists should be mentioned in README.txt or some another codeto manage paging for files

+++ b/includes/uuid_file_entity.features.inc
@@ -10,24 +10,57 @@
+    $files = $query->execute()->fetchAll();

could be very big, so maybe better to use here entityFieldQuery() and limit the list somehow with code comment