Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
This project is not covered by Drupal’s security advisory policy.
This module is a container for functions that extend Drupal's core Field API. It could be installed as a library and it would work just as well.
Currently it provides functions assisting with:
- Setting field items (prior to saving an entity)
- Programmatically adding different types of fields
Specifically, it provides the following functions:
- Set field items analog to field_get_items(), fieldhelp_field_set_items($entity, $field_name, $items)
- Set field items for a single value given an array of single values, fieldhelp_field_set_single_value_items($entity, $field_name, $values, $index = 'value')
- Set a single normal item, fieldhelp_field_set_item($entity, $field_name, $value)
- Get a single item, fieldhelp_field_get_item($entity, $field_name, $entity_type = 'node')
- Get a single item's value, fieldhelp_field_get_item_value($entity, $field_name, $index = 'value')
- Create a field, fieldhelp_create_field($field_name, $type, $cardinality = 1, $translatable = FALSE, $locked = FALSE, $settings = array(), $entity_types = array(), $indexes = array(), $storage = array())
- Create a field instance, fieldhelp_create_instance($field_name, $bundle, $entity_type = 'node', $label = NULL, $description = '', $required = FALSE, $default_value_function = '', $settings = array(), $widget = array(), $display = array(), $instance_additional = array())
- Sets the instance' label, fieldhelp_instance_set_label(&$instance, $label) and similar for required and description.
- Helpers to create text, textarea, integer, taxonomy, userreference, date, link, file, and image fields and field instances.
- Set displays for a given view mode.
- And more!
Created and presently developed by Stefan Freudenberg and Benjamin Melançon of Agaric.
Project information
- Module categories: Developer Tools, Site Structure
- Created by mlncn on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
7.x-2.0-alpha2
released 12 June 2015
Works with Drupal: 7.x
✓ Recommended by the project’s maintainer.
Development version: 7.x-2.x-dev updated 12 Jun 2015 at 02:38 UTC