This project is not covered by Drupal’s security advisory policy.

This module provides JS functions and callback urls to Create, Read, Update and Delete entities.

entity_create(entity_type, values);

Create a new entity by supplying an array of arguments. Returns a success/failure response.

entity_render_view(entity_type, entity_id, view_mode);

Return a rendered entity using a view mode if the url arguments match an existing entity.

entity_load_json(entity_type, entity_id);

This returns a dump of JSON for the entire entity. Yes, entity_load_json('user', 1); will return the admin user object with password hash et al.

entity_field_query_json(conditions, entity_load);

Returns JSON results from an EntityFieldQuery->execute(); command. Optional 'entity_load' boolean returns fully loaded entity objects as opposed to the default properties returned by EFQ.

entity_update(entity_type, entity_id, values);

Update an existing entity using an array of arguments. Returns a success/failure response.

entity_delete(entity_type, entity_id);

Delete an entity by providing its entity type and unique id. Returns a success/failure response.

USE WITH CAUTION

This module does provide a basic set of permissions on the entity bundle level. However, one should use extreme caution and never fully expose secured entities (ie: 'user') to non-admins.

Dependencies

Entity API

Project Information

Downloads