Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Nodes, comments, taxonomy terms, and users, in the terminology used since Drupal 7, are generally called "entities."
2
votes
Can't import configs on server due to some entities
Find out what changed in the entities. The change should most probably be in the field settings for one or more fields in the entity types listed in the messages. … Everything would be easy if there are a limited amount of entities with values in the conflicting fields and that the data could be handled manually by deleting the fields. …
1
vote
How to add a display format for the field
You will require to write your own custom field formatter to achieve that. There are detailed docs at : https://www.drupal.org/docs/8/creating-custom-modules/create-a-custom-field-formatter
File /mod …
2
votes
How to handle separated stock for a product bundle?
I am the author and maintainer of the Commerce Product Kit module which is close to your requirement.
It provides a "field formatter" for the "product reference" or an
"entity reference" fields …
7
votes
Accepted
How to implement a duration field?
Posting my comment as answer - Check for HMS (Hours Minutes Seconds) Field module.
Displays a integer formatted as Hours, Minutes or Seconds.
The field stores values as integer. Both input and o …
2
votes
Why does my 'UUID, Webform, Node' Feature remain overridden?
Deploy automatically manages dependencies between entities (like node references). …
3
votes
Accepted
How to convert username to hyperlink in comment reply similar to StackExchange?
You are looking for the Mentions module:
The Mentions module offers Twitter like functionality, recording all references to a user's username - using the [@username] or [@#uid] filter format - fro …
3
votes
Accepted
Print $entity info
You use the -> operator for accessing the data attributes in a PHP object.
Use $entity->id to access the id of the entity.
If you want to access a value of the field (which is an array), you do it l …
5
votes
Accepted
How do I have a dropdown select list for an entity reference?
Yes, you can. Drupal 8 does it out of the box as D7. The only difference is you can now choose the widget for any field in the Manage form display tab of a entity type.
E.g. Try changing the widget o …
1
vote
Turn text or link field in image
The best way to implement this is to implement a custom display formatter for the link field. You can either do it directly in a custom module by implementing hook_field_formatter_info.
Or without tr …
0
votes
Using Entity metadata wrappers to change field value under hook_node_insert()
The method you are using the save the field isn't ideal.
For setting the field values you should use the set() function provided by the EntityMetadataWrapper class.
function mymodule_node_insert($nod …
2
votes
Accepted
How to get a field with a relationship in a view
Note: I've written this generically; it should work for any type of entities (e.g. Nodes, Users, Files, Taxonomy, etc.) …
2
votes
How to add a CSS class to fields in Drupal 7?
Classes can be specified at the Manage display settings for content types, users and other entities.
OR
The Field Formatter CSS Class module. …
1
vote
How can I get the current widgets name of a node?
From the docs of field_info_widget_types() :
Returns information about field widgets from hook_field_widget_info().
Parameters:
$widget_type: (optional) A widget type name. If omitted, all widget typ …
11
votes
How can I get bundle of an entity from type and id?
Use entity_load to load the entity as mentioned by @Nikhil.
Then use entity_extract_ids, to extract the bundle. Example:
$entity = entity_load('node', array('7'));
list(, , $bundle) = entity_extrac …
1
vote
Deleting nodes makes orphan records
Incidentally, I got this error yesterday ;-) And after a bit of searching and looking into the documentation, I found that the cause was the functions which loads entities in Drupal and with the name like …