Questions tagged [drupal-entities]

"Entities" is the term that in Drupal 7 is used for nodes, comments, taxonomy terms, and users. Third-party modules can then define new entity types.

"Entities" is the term that in Drupal 7 is used for nodes, comments, taxonomy terms, and users. Third-party modules can then define new entity types.

One of the features of Drupal 7 entities is that they can have associated some fields created through the field UI, or implemented by third-party modules.

In Drupal 8, the API to handle entities has been extended, and entities are now object of specific classes implementing the interface; support for saving entities in the database has been added, where in Drupal 7 saving an entity was done by procedural functions.

Reference

See also

37 questions
0
votes
0 answers

Relating content in drupal

Need a drupal help. I have two content types, works and clients. When I'm adding a new work I'd like to include the client which the work was for, so I can display the client´s logo on the work detail page. Each work only has one client and each…
0
votes
1 answer

How can I programmatically create a select input whose values come from a foreign key using Form API?

I have Table A who has a foreign key referring to Table B. I want my form associated with Table A to have a select field whose values will come from Table B. I want the select field to have options with key-value pairs coming from Table B. Both…
Randell
  • 6,112
  • 6
  • 45
  • 70
0
votes
2 answers

Drupal 7: Taxonomies or Relations? what's a good why to strcuture hierarchial content

I'm a total Drupal Newbie, trying to understand the basic concepts of building hierarchical content. Let's say I'm building a website for a Music Label and want to represent this structure, should I use taxonomies, one of the Relation/Entity…
0
votes
1 answer

Drupal 7: Hooks for entity references

Is it possible to hook on changes of entity references? Let's say I have a <- b and b <- x -> a. when a <- b changes to d <- b I want also b <- x -> a to change to b <- x -> d
machete
  • 1,127
  • 2
  • 13
  • 26
0
votes
1 answer

Field Collection Output: Undefined index: entity in template_field__custom_field drupal 7

perhaps you have an idea how I can solve the following problem. I rewrite a field-collection-field in my template.php to change the output. Therefore I just added a new var ($my_classes) which contains a specific value. This value comes out of the…
0
votes
1 answer

attach image_field to entity in drupal 7

I use drupal 7, and Entity API to develope a module. I have an entity to record client information. I wish to use image_field to let client upload their logo. So I have this function: function silver_client_enable() { field_cache_clear(); …
0
votes
1 answer

Use of entity_extract_ids($entity_type, $entity)

I am trying to use entity_extract_ids($entity_type, $entity) where: $entity_type = The entity type; e.g. 'node' or 'user'. $entity = The entity from which to extract values. I have never used this function and don't understand what the second…
caliHI
  • 37
  • 5
1 2
3