From 2195cfb32745e0c15f970314e779ba9f42fd8356 Mon Sep 17 00:00:00 2001
From: OnkelTem <OnkelTem@239962.no-reply.drupal.org>
Date: Sat, 27 Oct 2012 17:59:02 +0400
Subject: [PATCH] Issue #1824772 by OnkelTem: Add entity properties to "Manage
 Fields" form

---
 eck.module |   24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/eck.module b/eck.module
index 41eea23..470c57e 100644
--- a/eck.module
+++ b/eck.module
@@ -859,3 +859,27 @@ function eck_entity_view_alter(&$view){
     }
   }
 }
+
+/**
+ * Implements hook_field_extra_fields().
+ */
+function eck_field_extra_fields() {
+  $extra = array();
+
+  foreach(EntityType::loadAll() as $entity_type){
+    foreach(Bundle::loadByEntityType($entity_type) as $bundle){
+      foreach($entity_type->properties as $property_name => $property_info) {
+        $extra[$entity_type->name][$bundle->name] = array(
+          'form' => array(
+            $property_name => array(
+              'label' => $property_info['label'],
+              'description' => t('Entity property'),
+              'weight' => 0,
+            ),
+          ),
+        );
+      }
+    }
+  }
+  return $extra;
+}
-- 
1.7.9.5

