SlideShare a Scribd company logo
1 of 11
Entity API




email: yuri.gerasimov@gmail.com
twitter: ygerasimov
skype: yuriy_gerasimov
 d.o.: http://drupal.org/user/257311
Agenda
What are entities?
What is Entity API for?
hook_entity_info() to create entities
Code examples
What are entities?
Entity types defined in core: nodes, users,
 taxomony terms, vocabularies, comments, files
Core functionality:
  Common hooks (hook_entity_load(),
   hook_entity_presave() …)
  Fieldable
  EntityFieldQuery
  Every entity should have Controller class
Entity API
entity_load(), entity_save(), entity_create(),
entity_delete()
entity_view(), entity_access(), entity_label(),
entity_uri()
entity_id(), entity_extract_ids()
entity_export(), entity_import()
entity_get_info(), entity_get_property_info()
core
Entity API metadata
Provide property info for your entity type, to
  Get tokens for all properties, via entity tokens.
  Get Views integration (as long the property has an
  equivalent column in the base table)
  Obtain support of modules building upon it lik
     Rules
     Search API
Code Demo
Entity API revisions
http://drupal.org/node/996696
Documentation
http://drupal.org/project/entity
Handbook: http://drupal.org/node/878784
http://bxl2011.drupaldays.org/node/313
Examples: commerce, profile2
Entity API




email: yuri.gerasimov@gmail.com
twitter: ygerasimov
skype: yuriy_gerasimov
 d.o.: http://drupal.org/user/257311
Создание собственных сущностей с использованием Entity API

More Related Content

Similar to Создание собственных сущностей с использованием Entity API

Understanding the Entity API Module
Understanding the Entity API ModuleUnderstanding the Entity API Module
Understanding the Entity API ModuleSergiu Savva
 
Yii Framework Security
Yii Framework SecurityYii Framework Security
Yii Framework SecurityIlko Kacharov
 
Batch Scripting with Drupal (Featuring the EntityFieldQuery API)
Batch Scripting with Drupal (Featuring the EntityFieldQuery API)Batch Scripting with Drupal (Featuring the EntityFieldQuery API)
Batch Scripting with Drupal (Featuring the EntityFieldQuery API)Ranel Padon
 
API Evolution and Usability
API Evolution and UsabilityAPI Evolution and Usability
API Evolution and UsabilityThiago Colares
 
JHipster Beyond CRUD - JHipster Conf' 2019
JHipster Beyond CRUD - JHipster Conf' 2019JHipster Beyond CRUD - JHipster Conf' 2019
JHipster Beyond CRUD - JHipster Conf' 2019Intesys
 
Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web DevelopmentRobert J. Stein
 
Spring training
Spring trainingSpring training
Spring trainingTechFerry
 
Jeff English: Demystifying Module Development - How to Extend Titanium
Jeff English: Demystifying Module Development - How to Extend TitaniumJeff English: Demystifying Module Development - How to Extend Titanium
Jeff English: Demystifying Module Development - How to Extend TitaniumAxway Appcelerator
 
ознакомления с модулем Entity api
ознакомления с модулем Entity apiознакомления с модулем Entity api
ознакомления с модулем Entity apiDrupalCamp Kyiv Рысь
 
Validate your entities with symfony validator and entity validation api
Validate your entities with symfony validator and entity validation apiValidate your entities with symfony validator and entity validation api
Validate your entities with symfony validator and entity validation apiRaffaele Chiocca
 
Generic Objects - Bill Wei - ManageIQ Design Summit 2016
Generic Objects - Bill Wei - ManageIQ Design Summit 2016Generic Objects - Bill Wei - ManageIQ Design Summit 2016
Generic Objects - Bill Wei - ManageIQ Design Summit 2016ManageIQ
 
Synapse india reviews on drupal 7 entities (stanford)
Synapse india reviews on drupal 7 entities (stanford)Synapse india reviews on drupal 7 entities (stanford)
Synapse india reviews on drupal 7 entities (stanford)Tarunsingh198
 
Drupalize your data use entities
Drupalize your data use entitiesDrupalize your data use entities
Drupalize your data use entities均民 戴
 
API Platform: A Framework for API-driven Projects
API Platform: A Framework for API-driven ProjectsAPI Platform: A Framework for API-driven Projects
API Platform: A Framework for API-driven ProjectsLes-Tilleuls.coop
 
Eclipse Modeling Framework
Eclipse Modeling FrameworkEclipse Modeling Framework
Eclipse Modeling FrameworkAjay K
 

Similar to Создание собственных сущностей с использованием Entity API (20)

Understanding the Entity API Module
Understanding the Entity API ModuleUnderstanding the Entity API Module
Understanding the Entity API Module
 
Yii Framework Security
Yii Framework SecurityYii Framework Security
Yii Framework Security
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
Batch Scripting with Drupal (Featuring the EntityFieldQuery API)
Batch Scripting with Drupal (Featuring the EntityFieldQuery API)Batch Scripting with Drupal (Featuring the EntityFieldQuery API)
Batch Scripting with Drupal (Featuring the EntityFieldQuery API)
 
Entity api
Entity apiEntity api
Entity api
 
API Evolution and Usability
API Evolution and UsabilityAPI Evolution and Usability
API Evolution and Usability
 
JHipster Beyond CRUD - JHipster Conf' 2019
JHipster Beyond CRUD - JHipster Conf' 2019JHipster Beyond CRUD - JHipster Conf' 2019
JHipster Beyond CRUD - JHipster Conf' 2019
 
Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web Development
 
Spring training
Spring trainingSpring training
Spring training
 
Drupal 7 field API
Drupal 7 field APIDrupal 7 field API
Drupal 7 field API
 
Jeff English: Demystifying Module Development - How to Extend Titanium
Jeff English: Demystifying Module Development - How to Extend TitaniumJeff English: Demystifying Module Development - How to Extend Titanium
Jeff English: Demystifying Module Development - How to Extend Titanium
 
ознакомления с модулем Entity api
ознакомления с модулем Entity apiознакомления с модулем Entity api
ознакомления с модулем Entity api
 
Validate your entities with symfony validator and entity validation api
Validate your entities with symfony validator and entity validation apiValidate your entities with symfony validator and entity validation api
Validate your entities with symfony validator and entity validation api
 
Generic Objects - Bill Wei - ManageIQ Design Summit 2016
Generic Objects - Bill Wei - ManageIQ Design Summit 2016Generic Objects - Bill Wei - ManageIQ Design Summit 2016
Generic Objects - Bill Wei - ManageIQ Design Summit 2016
 
Synapse india reviews on drupal 7 entities (stanford)
Synapse india reviews on drupal 7 entities (stanford)Synapse india reviews on drupal 7 entities (stanford)
Synapse india reviews on drupal 7 entities (stanford)
 
Introduce Yii
Introduce YiiIntroduce Yii
Introduce Yii
 
Drupalize your data use entities
Drupalize your data use entitiesDrupalize your data use entities
Drupalize your data use entities
 
API Platform: A Framework for API-driven Projects
API Platform: A Framework for API-driven ProjectsAPI Platform: A Framework for API-driven Projects
API Platform: A Framework for API-driven Projects
 
Eclipse Modeling Framework
Eclipse Modeling FrameworkEclipse Modeling Framework
Eclipse Modeling Framework
 
Drupal @ MediaCamp Athens
Drupal @ MediaCamp Athens Drupal @ MediaCamp Athens
Drupal @ MediaCamp Athens
 

More from DrupalForumZP2012

Архитектурные отличия тем для Drupal 7 от Drupal 6. Краткий обзор RDFa и рабо...
Архитектурные отличия тем для Drupal 7 от Drupal 6. Краткий обзор RDFa и рабо...Архитектурные отличия тем для Drupal 7 от Drupal 6. Краткий обзор RDFa и рабо...
Архитектурные отличия тем для Drupal 7 от Drupal 6. Краткий обзор RDFa и рабо...DrupalForumZP2012
 
Препроцессор Less.
Препроцессор Less.Препроцессор Less.
Препроцессор Less.DrupalForumZP2012
 
Управление отображением содержимого.
Управление отображением содержимого.Управление отображением содержимого.
Управление отображением содержимого.DrupalForumZP2012
 
Работа с пользователями.
Работа с пользователями.Работа с пользователями.
Работа с пользователями.DrupalForumZP2012
 
Управление содержимым.
Управление содержимым.Управление содержимым.
Управление содержимым.DrupalForumZP2012
 
Поиск уязвимостей в коде.
Поиск уязвимостей в коде.Поиск уязвимостей в коде.
Поиск уязвимостей в коде.DrupalForumZP2012
 
Черные дыры разработки. Как мода убивает эффективность.
Черные дыры разработки. Как мода убивает эффективность.Черные дыры разработки. Как мода убивает эффективность.
Черные дыры разработки. Как мода убивает эффективность.DrupalForumZP2012
 
Системы управления версиями (VCS). Знакомство с Git.
Системы управления версиями (VCS). Знакомство с Git.Системы управления версиями (VCS). Знакомство с Git.
Системы управления версиями (VCS). Знакомство с Git.DrupalForumZP2012
 
Создаем Drupal дистрибутив: от идеи до сопровождения.
Создаем Drupal дистрибутив: от идеи до сопровождения.Создаем Drupal дистрибутив: от идеи до сопровождения.
Создаем Drupal дистрибутив: от идеи до сопровождения.DrupalForumZP2012
 
Drupal commerce VS Ubercart 3.x.
Drupal commerce VS Ubercart 3.x.Drupal commerce VS Ubercart 3.x.
Drupal commerce VS Ubercart 3.x.DrupalForumZP2012
 
Боремся с "лишними" переходами на сайте, или еще пара слов о попапах и аяксах.
Боремся с "лишними" переходами на сайте, или еще пара слов о попапах и аяксах.Боремся с "лишними" переходами на сайте, или еще пара слов о попапах и аяксах.
Боремся с "лишними" переходами на сайте, или еще пара слов о попапах и аяксах.DrupalForumZP2012
 
Электронные платежные системы: Тенденции в отрасли и способы реализации.
Электронные платежные системы: Тенденции в отрасли и способы реализации.Электронные платежные системы: Тенденции в отрасли и способы реализации.
Электронные платежные системы: Тенденции в отрасли и способы реализации.DrupalForumZP2012
 
10 странностей Друпала или почему клиенты не любят Друпал.
10 странностей Друпала или почему клиенты не любят Друпал.10 странностей Друпала или почему клиенты не любят Друпал.
10 странностей Друпала или почему клиенты не любят Друпал.DrupalForumZP2012
 
Модуль GetLocations. Google Maps API ver.3 и Drupal.
Модуль GetLocations. Google Maps API ver.3 и Drupal.Модуль GetLocations. Google Maps API ver.3 и Drupal.
Модуль GetLocations. Google Maps API ver.3 и Drupal.DrupalForumZP2012
 
Rules. Обзор, примеры, API.
Rules. Обзор, примеры, API.Rules. Обзор, примеры, API.
Rules. Обзор, примеры, API.DrupalForumZP2012
 

More from DrupalForumZP2012 (20)

OpenSource и Вы
OpenSource и ВыOpenSource и Вы
OpenSource и Вы
 
Архитектурные отличия тем для Drupal 7 от Drupal 6. Краткий обзор RDFa и рабо...
Архитектурные отличия тем для Drupal 7 от Drupal 6. Краткий обзор RDFa и рабо...Архитектурные отличия тем для Drupal 7 от Drupal 6. Краткий обзор RDFa и рабо...
Архитектурные отличия тем для Drupal 7 от Drupal 6. Краткий обзор RDFa и рабо...
 
Препроцессор Less.
Препроцессор Less.Препроцессор Less.
Препроцессор Less.
 
Управление отображением содержимого.
Управление отображением содержимого.Управление отображением содержимого.
Управление отображением содержимого.
 
Работа с пользователями.
Работа с пользователями.Работа с пользователями.
Работа с пользователями.
 
Управление содержимым.
Управление содержимым.Управление содержимым.
Управление содержимым.
 
Поиск уязвимостей в коде.
Поиск уязвимостей в коде.Поиск уязвимостей в коде.
Поиск уязвимостей в коде.
 
Черные дыры разработки. Как мода убивает эффективность.
Черные дыры разработки. Как мода убивает эффективность.Черные дыры разработки. Как мода убивает эффективность.
Черные дыры разработки. Как мода убивает эффективность.
 
Системы управления версиями (VCS). Знакомство с Git.
Системы управления версиями (VCS). Знакомство с Git.Системы управления версиями (VCS). Знакомство с Git.
Системы управления версиями (VCS). Знакомство с Git.
 
Создаем Drupal дистрибутив: от идеи до сопровождения.
Создаем Drupal дистрибутив: от идеи до сопровождения.Создаем Drupal дистрибутив: от идеи до сопровождения.
Создаем Drupal дистрибутив: от идеи до сопровождения.
 
Drupal commerce VS Ubercart 3.x.
Drupal commerce VS Ubercart 3.x.Drupal commerce VS Ubercart 3.x.
Drupal commerce VS Ubercart 3.x.
 
Боремся с "лишними" переходами на сайте, или еще пара слов о попапах и аяксах.
Боремся с "лишними" переходами на сайте, или еще пара слов о попапах и аяксах.Боремся с "лишними" переходами на сайте, или еще пара слов о попапах и аяксах.
Боремся с "лишними" переходами на сайте, или еще пара слов о попапах и аяксах.
 
Электронные платежные системы: Тенденции в отрасли и способы реализации.
Электронные платежные системы: Тенденции в отрасли и способы реализации.Электронные платежные системы: Тенденции в отрасли и способы реализации.
Электронные платежные системы: Тенденции в отрасли и способы реализации.
 
Drupal as service.
Drupal as service.Drupal as service.
Drupal as service.
 
Drupal and NodeJS.
Drupal and NodeJS.Drupal and NodeJS.
Drupal and NodeJS.
 
Drupal Apps.
Drupal Apps.Drupal Apps.
Drupal Apps.
 
10 странностей Друпала или почему клиенты не любят Друпал.
10 странностей Друпала или почему клиенты не любят Друпал.10 странностей Друпала или почему клиенты не любят Друпал.
10 странностей Друпала или почему клиенты не любят Друпал.
 
Модуль GetLocations. Google Maps API ver.3 и Drupal.
Модуль GetLocations. Google Maps API ver.3 и Drupal.Модуль GetLocations. Google Maps API ver.3 и Drupal.
Модуль GetLocations. Google Maps API ver.3 и Drupal.
 
Render API.
Render API.Render API.
Render API.
 
Rules. Обзор, примеры, API.
Rules. Обзор, примеры, API.Rules. Обзор, примеры, API.
Rules. Обзор, примеры, API.
 

Recently uploaded

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 

Recently uploaded (20)

Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 

Создание собственных сущностей с использованием Entity API