C
C
cosonicsq2020-06-23 21:28:13
Drupal
cosonicsq, 2020-06-23 21:28:13

What is entity, config entity, content entity in Drupal?

How many do not read the documentation I can not understand these three terms. This is partly due to the fact that it is difficult to correctly translate technical English even with Google translator.

And on Russian-language resources they write that entity is an entity. But without specific examples... And I don't understand what are entities in Drupal... An entity is that some element that is displayed on the page or what?
About config entity, content entity is written even more confusingly.

Please explain these three terms. If possible with examples. That is, for example: such and such things belong to the config entity

and they are located there ... PS I have assumptions that these three terms are somehow connected with the MVC architectural approach anddatabases , but since back-end and databases are just starting to study, I don’t really understand these terms.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
andead, 2020-06-24
@cosonicsq

An entity is an object with a set of properties and methods. For example, a node, it has title, status properties and save(), isPublished() methods, etc. Another example is the user entity, it has name, password properties and isAnonymous(), removeRole() methods, etc.
There are two types of entities in Drupal - content entity and config entity.
Content entities are entities that contain user-generated content, i.e. nodes, users, comments, files, etc. Content-entity can be expanded from the admin panel with fields and customize their display.
Config entities are entities that can be described in code, such as Views, date formats, field display settings, image styles. In simple terms, this is the site settings. Config entities can be exported/imported/deployed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question