欢迎各位兄弟 发布技术文章
这里的技术是共享的
7.x field.info.inc | field_info_field_map() |
Returns a lightweight map of fields across bundles.
The function only returns active, non deleted fields.
array( 'body' => array( 'bundles' => array( 'node' => array('page', 'article'), ), 'type' => 'text_with_summary', ), );
An array keyed by field name. Each value is an array with two entries:
type: The field type.
bundles: The bundles in which the field appears, as an array with entity types as keys and the array of bundle names as values.
Example:
modules/
field/
field.info.inc, line 468
Field Info API, providing information about available fields and field types.
function field_info_field_map() { $cache = _field_info_field_cache(); return $cache->getFieldMap(); }
Comments
dev versions only
As of 7.20, this function is not yet available in stable releases of Drupal.
Log in or register to post comments
It is included in Drupal 7.22
It is included in Drupal 7.22, which will be released today.
Log in or register to post comments
来自 https://api.drupal.org/api/drupal/modules%21field%21field.info.inc/function/field_info_field_map/7.x