Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation:
It's not currently possible to:
* Create a view of node types
* Create a view of fields with node types to which they are attached
* Create a rule to react when a new node type is created
* Automatically add a field instance to a node type using Rules
Proposed Solution:
Add wrappers for:
* Entity Types
* Field Instances
Comments
Comment #1
mitchell CreditAttribution: mitchell commentedPossibly related to #1472752: Add an "entity is of bundle" condition, and also Field Rules may have some useful code.
Comment #2
mitchell CreditAttribution: mitchell commentedAlso of interest: in #1668820-53: Concept, base class, and interface for Configurables (e.g., node types, image styles, vocabularies, views, etc),
ConfigStorageController implements EntityStorageControllerInterface
.#1682760: Implement computed properties and #1525812: add support for complex data types are more likely to have DX relevance for #100925: Add "OO" bundle inheritance features and other cool stuff at the code level. I'll leave this open primarily for the benefits of using Views to display this info and also later to figure out how Rules would be used to configure entities / fields in a post-bootrap, dynamic environment.
Comment #3
fagoThat would be a feature request for views, has nothing to do with entities.
Well, that's intentionally not support. I don't think automatic configuration changes is someting we want do with Rules, thus that's not supported. You can add it via contrib modules as field rules though :)
@wrappers: As they are not entities, it does not belong into entity api either. Could be done by contribs though.