Skip to main content
9 events
when toggle format what by license comment
May 23, 2017 at 21:36 comment added rjl That is a tough question, the creator of the robot module decided that he (or she) needed a config entity and not a content entity as a solution for what they needed. That example is both good as it is pretty straight forward, and bad as it doesn't really provide a use case and why a robot was the solution. That poor robot doesn't do much, but you can configure it (humor). Here is a good slide show from Acquia that provides a nice over view of entities (and a little history) slideshare.net/AcquiaInc/…
May 23, 2017 at 21:23 comment added Mike thanks for hanging in on this long exchange. As to the robot module. Why make it a config entity; why not a content entity?
May 23, 2017 at 15:18 comment added rjl Well "how to use" is pretty broad, so... I think what's important is to understand how existing features work - at first it doesn't really matter if views or roles are config or content entities. Once you understand how a feature works, if it solves your particular use case, that is great (and maybe it still doesn't matter if it's config or content). But if you want to change a feature or add a feature that does not exist, then it is important. So I would ask, what is your use case? That goes back to the robot module, someone needed a robot, it didn't exist, so they created one.
May 23, 2017 at 14:39 comment added Mike I’ve grasped the structural difference – I think – between a content and config entity. What I think I’m confused about perhaps is what and how to use a configuration entity. Can I create a new view with one? Change the access to content by adding or modifying a role?
May 20, 2017 at 5:00 comment added rjl It is a config entity type. See the line @ConfigEntityType( in api.drupal.org/api/examples/… and it has no relationship to nodes which is what is is added with Add Content
May 19, 2017 at 22:39 comment added Mike I agree, I've found much of Drupal's terminology confusing. So is the "Robot" a content "type" and why doesn't is appear in the Add Content list?
May 19, 2017 at 20:39 comment added rjl One thing that confuses the issue is the name "Content." Drupal core provides the node entity (and node type entity) - node is the main content entity and it's called "Content" in umpteen million places (and node types are called "Content Types"). Sometimes when people talk about "Content" entities they are talking about different node types (ie page or article) and sometimes they are talking about a completely different entity - which is a Content Entity with it's own class definition and UI. The Robot example is it's own entity with no relationship whatsover to node or node types.
May 19, 2017 at 20:05 comment added Mike Saying that content types are configuration entities sounds right and makes sense. And I thought that was what the configuration entity example from the examples module, which creates a robot, was doing. But it doesn’t show up in the table on the Home->Administration->Structure page, nor am I able to add one through the normal Add Content method; it has it’s own Add form.
May 19, 2017 at 18:54 history answered rjl CC BY-SA 3.0