Is there a module that shares one input form for multiple entity types - drupal

Drupal shares fields between multiple entity types.
Is there a module that shares an input form view for multiple entity types?
Configuring a form for each entity type is a headache.

Related

Use the unique values from a field in one content type as a filter in another content type

I need some help with a Drupal views filter. I'm not a developer but I have been using Drupal for several years.
I have a content type named 'City/Town' that contains several fields including state and county. I'm using this content type as an entity reference field in another content type named 'Project'.
I would like to use a unique value list of States as a filter in a view of Projects.
I've installed the Views Entity Reference Filter (https://www.drupal.org/project/verf) module but I'm only able to access the entity reference title, not any of the fields that are part of the content type.
The project I'm working on is still in design phase so I can change my approach if there is a viable solution.
You need to get the relationship to the reference in views. Then you have access to the fields of the reference for viewing, sorting & filtering.

Adding a self-referential field

I am creating a new content type called idhhb_node. This content type represents any of the training material available through a company - books, cds, websites, etc. An idhhb_node will have between 1 and 5 prerequisites.
The problem is the prerequisites are also of type idhhb_node, but the pulldown for field type does not allow List(iddhb_node) as a type.
Another interesting thing. It appears that the pre-existing node types are not available as fields either. For instance, a field cannot be an Article or Page even though Drupal 7 comes with those nodes activated by default.
Try using the Entity Reference module, which gives you access to an Entity Reference field type. It allows you to do more than the standard Node Reference fields.

Symfony 2: Howto Map 2 way multiple Entities with one FormType

Suppose i have an Bundle to manage anything related to advertisements.
This bundle contains an Entity Advertisement. this has an field for relation purposes: lets say relation field
Suppose i have an Entity Company and an Entity Events in different Bundles
(In companies there are companies stored and in events there are events stored.)
Case:
The entities have a relation to multiple Advertisements.
A single Advertisement has a relation to only one of the entities.
From the perspective advertisement:
I want to be able to select one of the entities (entity.id) to view or update the reference (like dropdown)
From the perspective of an event or a company:
I want to be able to select/add/delete multiple advertisements (like the symfony collection form type)
all this preferred without the use of foreign-keys.
the entities are like "modules" so there can be more than just these entities.
I think you just have to use OneToOne (For Advertisement) and OneToMany (For Company and Events) relations.
It's easy to use, read this doc : http://docs.doctrine-project.org/en/2.0.x/reference/association-mapping.html

Link some users to a content

I have created a content type called "Event". For each event, I would like to be able to specify contacts (people in charge of organising).
Therefore I would like to add a field "Contact" to the Event type, where a widget would give access to the list of users. One could then pick one or several users.
This field would be displayed as a list of links to the profiles of those users.
I seem to remember there was a module providing that widget in Drupal 6, but I am now using Drupal 7, and haven't been able to find the necessary module!
Thanks!
(NB: I'm not using the Event module, but Date + Calendar.)
Here are two possible options you can check out:
Entity Reference module - can reference user entities
Provides a field type that can reference arbitrary entities
Relation module
Relation is an API module and storage model for both simple and the
most complex relations between entities. The module can handle both
directional and symmetrical relations very well.

Merging two content types in a view

In Drupal 7, I have the following content types:
Project (which has a field collection of milestones which has a field collection of tasks)
Bugs/Requests
Is there a way to list all the "tasks" by themselves and bugs in one view?
I'm not very sure about this but you can use
http://drupal.org/project/nodereference_field
reverse_node_reference module enhances views with reverse relationships for node reference fields.

Resources