"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.

learn more… | top users | synonyms (2)

0
votes
0answers
12 views

Get whole node by post type

Is there any way of getting a node by its post type? I've tried with entity query but it doesn't really work.
0
votes
1answer
13 views

How can I update the field of the entity?

I have an "Question" entity, and I need to updates its 'key' field (of string type): My code isn't working: $storage = \Drupal::entityManager()->getStorage('question'); $query = ...
0
votes
1answer
15 views

How do I have a dropdown select list for an entity reference?

For Drupal 8, the entity reference field displayed in form is a textfield with auto-complete feature for you to select the entity, is it possible to have it be dropdown select list instead? I have ...
0
votes
0answers
8 views

How to custom theme Inline Entity Form (IEF) - using a .tpl.php file

Is there a way to theme the Inline Entity Form (IEF) for example creating a .tpl.php file for that form and just declaring it on the theme's template.php? I wanted to create a .tpl.php specifically ...
0
votes
0answers
12 views

How to create and synchronize products with entities on another Drupal website (using Services)

Case description: I have one 'Asset management' Drupal website "A" (something like a simple ERP site) which manages the administration of purchased assets, being ECK entities. I also have a Drupal ...
0
votes
1answer
13 views

Render an image field with entitywrapper [on hold]

I'm using a hook to alter a form in commerce hook_form_commerce_cart_add_to_cart_form_alter. I want to add some checkboxes to choose some products and I want to print out with its title and image. I ...
0
votes
0answers
14 views

default value for entity reference field in content type [duplicate]

I have a content type with an entity reference field and I need to add a default value to that field . while creating a content it should have a default value .The field created is entity reference ...
0
votes
0answers
15 views

How do I create an autocomplete textfield? [duplicate]

I have a textfield, which should be autocompleted with the IDs of another entity ('context'). How can I do this? $form ['context_key'] = [ '#title' => t('Context key'), '#description' ...
2
votes
0answers
27 views

JSON Schema of my entities

In the process of building a headless website… and one of the first requirements it was to provide json schema of my data model (json data from my entities.) Here will be an example of user entity. ...
1
vote
1answer
14 views

Content translation of paragraphs

I'm trying to translate paragraphs in Drupal 8. According to this bug report, which is marked as fixed, it should work. #2543258: Entity references of untranslatable fields are not displayed in the ...
4
votes
2answers
173 views

Entity reference widget

I know that in Drupal 8 the taxonomy term reference is deprecated and it's implemented by an entity reference in Drupal 8 Core. Is there any widget to select items by checkbox list instead of the ...
0
votes
0answers
22 views

How do I define a computed field equal to the concatenation of two fields of my custom entity?

I have a custom entity (Person) with these fields: ID, nom, prenom, telephoneportable, estactive, userID, created, changed. I created it with baseFieldDefinitions. I want to have a computed field ...
0
votes
1answer
19 views

Trying to create a user with an entity reference taxonomy term using services

So I've been trying to create a user with an entity reference taxonomy term, however for some reason it doesn't seem to work. I've noticed that it depends on the widget used, but I've tried every ...
0
votes
2answers
22 views

Field widget value not able to save via ajax

I am trying to create a custom field type widget with a ajax submit handler to save the value of the field to the database without saving the whole node. Here is my code hook_field_field_info(). ...
0
votes
1answer
37 views

Displaying fields in entity_reference data

I'm using the entityreference module to provide my "Concert" content type with a "Program" field (machine name "field_program"), containing multiple "Song" nodes. Each Song just has two fields: Title ...
0
votes
1answer
20 views

How to load a node given a menu link id?

I have this id via $link->getParent(): menu_link_content:6cf83fce-228f-42da-bc39-bea06c767510 How do I get the node id of that menu link?
1
vote
0answers
15 views

How do I store data in entities text-list and field-collections?

I have retrieved data from an external database using REST. Now that it is cached in my Drupal 7 site in tables, I need to create new nodes of a specific content type. Works fine for most fields ...
0
votes
0answers
10 views

Skip save of field collection attached to entity without removing reference to field collection?

I've got a node form encumbered with many field collections and node save takes forever. I would like to "lock" some of those field collections and forgo saving them on node save. Kind of like ...
0
votes
1answer
16 views

Count the number of references [closed]

My entity has a entity_reference field (processes) and it is displayed as a check box group. In the list builder I need to display the number of checked references. $storage = ...
0
votes
0answers
19 views

How to use machine_name form element on entity form?

machine_name form element is smart enough to read it's value from designated field on the same form and transform it into machine friendly string. By default it's label field but it can be changed: ...
0
votes
0answers
40 views

Related Content View using Entity Reference Fields and Taxonomy Depth

I would like to display a "Related Content" block on nodes of type Car when the content being viewed shares the same Entity Reference field value of node of type Parts. Content Type #1 - Car Title ...
0
votes
0answers
9 views

Displaying Token Field Labels From Fetched Entity In Rules HTML Email

I am sending a MIME HTML email using rules. Much of the information contained in the email comes from a fetched custom entity (custom ECK entity). Using the available replacement patterns, I can get ...
0
votes
0answers
7 views

Entity Reference of Taxonomy Term to Show Fields and Multiple Items in View

I have a taxonomy with parent / child setup. Vocab: -Parent --Child1 ---Custom Field ---Title (label) ---Term Description --Child2 ---Custom Field ---Title (label) ---Term Description I am using ...
0
votes
0answers
10 views

How to add properties to ConfigurableLanguage config entity?

I need to add some properties to the ConfigurableLanguage. I need to have them editable when editing or adding a language and when getting language object from language manager service. I can handle ...
0
votes
0answers
21 views

Drupal 8: How to use the same EntityListBuilder for entity A and an extended version B

I have used the content entity example coming from the example project. This example define a Contact entity. Next I have extended this Contact class in an Artist class with some added fields (let ...
0
votes
0answers
12 views

Grabbing and Manipulating Endpoints/Referenced Entities in Rules

Using Rules, I am creating relations from a Lab Cage Content Type that has a field that is an entity reference list, where you can select a list of Mice entities. For instance, if the user selects 3 ...
0
votes
1answer
31 views

How do I make parent taxonomy paths?

I installed Pathauto, Tokens and Entity API module in Drupal 8 and I have been unable to create a pattern that would allow parent taxonomies and then the final node for content type pages. In Drupal 7 ...
0
votes
2answers
25 views

How add query to EntityListBuilder

I want to add a query to filter my entity list table. class CommandesLignesEntityListBuilder extends EntityListBuilder { use LinkGeneratorTrait; /** * {@inheritdoc} */ public function ...
0
votes
2answers
27 views

look up page View by its path

We can search all the default views on our relatively new Drupal 8 site, to see what view resides at a particular path, with a query like: $view_trim_path = 'blog'; $query = ...
0
votes
1answer
27 views

Best way to store not publicly viewable data? [closed]

I wanted to know what is the most suited to store not publicly viewable data? Here is an example what I want to achieve: Imagine having a personal section about me. On this site I show the visitors ...
0
votes
1answer
27 views

Content entity form not displaying the previously selected value

Even though I can see that my data is being saved it doesn't ever appear to be set when I go back to edit my entity via a form. Am I missing something in my setup? Here's what I have: ...
0
votes
0answers
39 views

How set default value for entity reference field

I want set a default value for my entity field reference refer to his parent. I am on his parent and with a link i load a popup with the form of the child : My parent is in the URL param value 2 ...
0
votes
1answer
13 views

Entity Embed module not working as expected

I am wanting to use the Entity Embed module, and have installed this an it's dependent, Embed module, in Drupal 8. There are no errors in the log, nor any javascript errors. When I go to create the ...
0
votes
1answer
24 views

Unable to get my ContentEntity base field definition to appear as checkboxes

I am trying to implement a base field with multiple selections as checkboxes I have had a go at implementing it but it stills appears as a select even after clearing the cache. I'm sure I'm doing this ...
3
votes
1answer
28 views

How to assign content to user for manage turns?

I need to create a system to assign turns to a people register in the site, for this need contemplate: The administer assign turn to user in specified place.ex(turn 1, place 1, user 1) There are two ...
0
votes
1answer
26 views

How to get the fields of the entity?

I need to get all the names of the entity, my entity is called 'a_process'? How can I write such query in Drupal 8 ? $nodes = entity_load_multiple('a_process', $name); Thanks in advance
0
votes
1answer
33 views

get menu link Page Settings from View configuration

When I have a node on the main menu, I can find its Menu Settings with an entityQuery on the content entity for its menu link, for example: $system_uri = "entity:node/42"; $query = ...
0
votes
0answers
19 views

How to represent entity_reference as radio buttons group?

I have an Entity, and one of the fields is of entity_reference type, I need to represent it as radio group? How can I do it? $fields['context_question'] = ...
1
vote
1answer
26 views

REST interface to custom entity type getting constant 403's

I created my module and the entity definition using the drupal console. It has not been modified at all. My entity is for a user but for various reasons I won't be using the pre existing user entity. ...
1
vote
2answers
30 views

Broken modules are not rolled back

I try to develop a D8 module with entities. A lot of them ^^. But there is an issue with the way D8 handles the creation of tables during the installation process. If the definition of the entities is ...
2
votes
1answer
44 views

How to implement just a 'Purchase Order' solution (without Drupal Commerce)?

Here is the situation: I need create a content type 'Purchase Order' with just few fields: date, product to buy, quantity, price unit, price total, author. The goal is don't need be finding in the ...
0
votes
0answers
13 views

How To Alter Nodequeue or EntityQueue search Autocomplete

I want to use nodequeue or entityqueue in Drupal 7 and want the autocomplete search for a given queue to use a custom field other than the node title. Is there a way to do this without hacking the ...
0
votes
0answers
12 views

In custom form, how can I add a select field using “entity reference view” [duplicate]

I have an entity reference view (views block with entity reference display of a list of nodes that have "Certification" checked (boolean)). I am able to use this view from the content type manage ...
0
votes
0answers
11 views

Fetch all fields of an entity and their data, for a simple clone Rule

I don't think this is possible out of the box in Rules, but I would like to create a Rule that clones an entity of a specific type. Using for example a Rules Link as trigger, the The bundle type of ...
0
votes
0answers
10 views

How to control the fields states of Content Type?

I have several fields in my Content type entity and some of them should depend on the states of others. How can I implement it? Drupal 8 I tried the hook_form_alter () , but all elements, I add ...
1
vote
0answers
24 views

How do I allow my custom entity to be rendered using an entity_reference field?

Using Drupal 8, I created a custom entity, configured a few view modes for it, and then added an entity_reference field from another entity to my custom entity. In the display configuration for my ...
0
votes
1answer
18 views

Looking for an entityreference widget that allows to preselect an entity bundle

I'm using one entityreference field in many entity types (bundles) because of the convenience that gives in Panels (just one relation to add in context). However, the drawback is that the standard ...
1
vote
0answers
16 views

Field data modelling

I have a content type PLACE with simple text and image fields. Now I need to add a field to this content type where the user needs to select something for each month (he can select good OR bad or ...
0
votes
0answers
24 views

Entity Metadata Wrapper: set Date Field with unknown Timezone

I need to create nodes programmatically and I chose to use the helpful EntityMetadataWrappers. But I have a real doubt about setting datefields. I found in this thread (and checked on my code) ...
0
votes
0answers
52 views

Changing a node's content type

In Drupal 7, I can easily switch a node's content type by using Node convert. Node Convert, however, has not been ported to Drupal 8, nor does there appear to be much enthusiasm for the port. If I ...