Skip to content

vacho/entities_data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Drupal 7 entities_data

The purpose of this project is to provide to drupal programmers an easy way to access an save datas located in drupal entities.

Done

  • Queries to 1 Single node entity.
  • Queries to 1-1 nodes entities.
  • Queries to 1-n nodes entities.
  • Set datas in a single node entity
  • Support node and user entities

Usage

Include this code in your module

  //example get datas from node with entity relation (address)
  $id = "12345";
  $partner = EntitiesData::getData('node', 'people', "first_name last_name adress(node,street number)", "id=$id");
  //this return a array of arrays

  //exmplate to set datas in a node
  $date = date("Y-m-d H:i:s");
  EntitiesData::setDatas('node', '51', "first_name,birthday", "Osvaldo,$date");

To do

Queries for get:

  • n-1 relations.
  • n-n relations.

Queries for set:

  • 1 relations.
  • 1-1 relations.
  • 1-n relations.
  • n-1 relations.
  • n-m relations.

Set datas into:

  • Nodes with relations
  • Other entities type

References

https://www.drupal.org/docs/7/creating-custom-modules/howtos/how-to-use-entityfieldquery-for-drupal-7

About

The purpose of this project is to provide to drupal programmers an easy way to access an save datas located in drupal entities.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages