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

Yii Framework Security
Yii Framework SecurityYii Framework Security
Yii Framework Security
Ilko 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
 
ознакомления с модулем Entity api
ознакомления с модулем Entity apiознакомления с модулем Entity api
ознакомления с модулем Entity api
DrupalCamp Kyiv Рысь
 
Eclipse Modeling Framework
Eclipse Modeling FrameworkEclipse Modeling Framework
Eclipse Modeling Framework
Ajay 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

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 

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