Tagged Questions
0
votes
1answer
15 views
How should I implement an alternative file upload?
I want to write a module for Drupal 7 to integrate http://filepicker.io's awesome functionality. It's a simple JS widget that returns a URL of where the file is hosted.
I've never written a D7 module ...
0
votes
1answer
13 views
Additional fields for Ubercart uc_order_product
I need to add fields to the Ubercart entity uc_order_product. I was looking into the function field_create_instance, but don`t know exactly where to use it. I believe I should attach the field I want ...
1
vote
1answer
28 views
How to change content type field values with the entity system — getting a “doesn't support writing” error
I've got a D7 content type with a few fields; nothing particularly special. I want to be able to programattically change the values of those fields from time to time, and so wrote a function like so:
...
0
votes
1answer
40 views
creating a custom entity which stores multiple bundles as per user input?
I want to create an custom entity(Lets say payroll entity) which has the following fields
1. Basic salary
2. Earnings
3. Deductions
It is possible by Entities
But now I would like to add some new ...
3
votes
1answer
88 views
Should I create fielded content types (with 1000+ tables) OR create custom entities with properties instead of fields (way less tables)?
I have a case where I have a lot of entities that can be stored with Drupal as node (content types) and fields. I had to end up creating 105 content types, 20 taxonomies and in-numerous fields. And ...
0
votes
0answers
32 views
Cannot get field/display options to display with entity
I've built an entity that declares a fieldable type of true, and yet when I go to a defined administration page to add a new entry, I cannot find any links pointing to the field creation prompts. I'm ...
1
vote
0answers
41 views
Pulling Values from $order in Commerce Cart
I am trying to pull the value of a selected item in a field list located in the order entity. Later this is used to determine what panes should be shown in the checkout workflow. I should note that ...
1
vote
2answers
193 views
D7 pseudo-fields and custom entity properties from additional schema
I'm trying to add property information to an entity which uses the entity api. Working from the commerce_product module I am trying to manage additional information outside of fields and in my own ...
2
votes
2answers
59 views
Adding to that list of display options that includes “Default” and “Teaser”
Under structure > content types > manage fields, there are display options in the upper right. The system-defined ones are "default" and "teaser" but I have seen "tokens" and "colorbox" added by ...
4
votes
2answers
331 views
How to refresh entity from entity_load(), reloading the entity as it is now?
If an entity has already been loaded, entity_load() retrieves it from memory rather than reloading it. Makes sense.
But: what can you do when you need to reload an entity that has already been ...
0
votes
1answer
223 views
Minimum entity properties for field_attach_update()?
Question: What are the properties that are essential to be defined in the entity passed to field_attach_update() for the function to update the appropriate fields (and not silently do nothing)?
This ...
3
votes
1answer
635 views
How to get users (entities) for a certain field value?
I want to write a function that returns users which have entered a certain value to a custom user field.
Lets say there is a custom birthday field for every user. What would be the best way to get ...
1
vote
2answers
937 views
EntityFieldQuery fieldCondition
I have the following code:
$query = new EntityFieldQuery();
$result = $query
->entityCondition('entity_type', 'field_collection_item', '=')
->propertyCondition('field_name', ...
9
votes
2answers
761 views
How to implement field formatters for entity properties
I created a custom entity using Entity API that has certain properties defined in hook_schema() and also declared in entityPropertyInfo(), a class extending EntityDefaultMetadataController.
So far so ...
0
votes
0answers
70 views
“Link this field” the Entity API problem?
I am not sure from where the problem comes, but I am using Entity API and Views integration with Field collection module.
The option Link to entity is not working. Check the images below.
Here ...