123ArticleOnline Logo
Welcome to 123ArticleOnline.com!
ALL >> Computer-Programming >> View Article

Field Api In Drupal Development

Profile Picture
By Author: Dharmesh Aegis
Total Articles: 105
Comment this article
Facebook ShareTwitter ShareGoogle+ ShareTwitter Share

Drupal is open source software and a platform supporting latest technologies that web offers. It is available for free and thus is an economic way for drupal developers to develop solutions for their clients. Drupal development is offered by many service providers and people use it for its rich features that it offers like modular, collaboration, user-friendly, standards and much more.
Drupal developers who want to get themselves involved directly in Drupal core development needs to know about Field API. The Field API is a major functionality in Drupal 7 which provides custom data types. Let us discuss about it in details for Drupal development. The first step would be to attach custom data fields to the entities. Field API allows to store, load, edit and render filed data after it has been attached. Any entity type can use Field API to make it fieldable and allowing fields to be attached to it. User interface is provided by modules which allow custom fields to manage via a web browser.
Field and instance are two data structures defined by Field API. The field instance is attached to a single bundle and bundle is ...
... set of fields.
Field definitions are represented as an array of key/value pairs.
array $field:
" id (integer, read-only)
" field_name (string)
" type (string)
" entity_types (array)
" cardinality (integer)
" translatable (integer)
" locked (integer)
" module (string, read-only)
" active (integer, read-only)
" deleted (integer, read-only)
" columns (array, read-only
" indexes (array).
" foreign keys: (optional)
" settings (array)
" storage (array) There are sub-array of key/value pairs that identify the storage backend that can be used for the field:
" type (string) The storage backend used by the field.
" module (string, read-only) The name of the module that implements the storage backend.
" active (integer, read-only) TRUE if the module is currently enabled while implementing the storage backend is currently enabled, FALSE otherwise.
" settings (array) A sub-array of key/value pairs of settings. Each storage backend defines and documents its own settings.
Field instance definitions are represented as an array of key/value pairs.
array $instance:
" id (integer, read-only)
" field_id (integer, read-only)
" field_name (string)
" entity_type (string)
" bundle (string)
" label (string)
" description (string)
" required (integer)
" default_value_function (string)
" default_value (array)
" deleted (integer, read-only)
" settings (array)
" widget (array) sub-array of key/value pairs which identify the Form API input widget for the field when used by this bundle are:
1. type (string)
2. settings (array)
3. weight (float)
4. module (string, read-only)
" display (array)
" default (array) A sub-array of key/value pairs describing the display options are:
1. label (string)
2. type (string)
3. settings (array)
4. weight (float)
5. module (string, read-only)
" some_mode: A sub-array of key/value pairs describes the display options which are used in the field being disoplayed in 'some_mode' view mode. These options are applied only at run time if view mode is not configured to use the default settings.
" other_mode
The (default) render arrays produced for field instances are documented atfield_attach_view().
When talking of Bundles they are represented by two strings: the first one is entity type and the second one is a bundle name.
" Field Types API.
" Field CRUD API.
" Field Attach API.
" Field Info API.
" Field Storage API.
" Field API bulk data deletion.
" Field language API.


For More Info:- Drupal Development | Outsource Drupal Developers

Total Views: 184Word Count: 510See All articles From Author

Add Comment

Computer Programming Articles

1. Which Are The Best Java Coding Classes In Bhopal?
Author: Shankar Singh

2. Warehouse Management In Zambia: Essential Features To Look For
Author: Doris Rose

3. Ecommerce Web Design And Development In Melbourne With The Merchant Buddy
Author: themerchantbuddy

4. Why Website Maintenance Is Crucial For Business Success
Author: Yogendra Shinde

5. Boost Your Business With Smart Invoice Pos Software In Zambia
Author: Cecilia Robert

6. How Stablecoin Development Ensures Stability And Security?
Author: Michael noah

7. Công Cụ Tính Chiều Cao Chuẩn Từ Minbin Tool: Đo Lường Và Cải Thiện Chiều Cao Hiệu Quả
Author: KenJi123

8. How To Make A Courier App For Courier Delivery And Tracking Service
Author: Deorwine Infotech

9. Reputation Management In The Digital Age: Protecting And Enhancing Your Law Firm’s Image
Author: jamewilliams

10. What Features Should I Look For In Wordpress Ecommerce Plugins?
Author: Rocket Press

11. Staying Updated With The Latest Gaming News
Author: Next Tech Plus

12. Game Development: Evolving Technologies And New Horizons
Author: Rick John

13. Why Svelte Is The Most In-demand Framework For Web Development?
Author: Why Svelte Is The Most In-Demand Framework For Web

14. Maximizing Ebay Sales With Maropost/neto And Pursuit Info Solutions
Author: rachelvander

15. The Importance Of Software Testing: Ensuring Quality In Development
Author: John Mathew

Login To Account
Login Email:
Password:
Forgot Password?
New User?
Sign Up Newsletter
Email Address: