Extra Block Types (EBT) - New Layout Builder experience❗

Extra Block Types (EBT) - styled, customizable block types: Slideshows, Tabs, Cards, Accordions and many others. Built-in settings for background, DOM Box, javascript plugins. Experience the future of layout building today.

Demo EBT modules Download EBT modules

❗Extra Paragraph Types (EPT) - New Paragraphs experience

Extra Paragraph Types (EPT) - analogical paragraph based set of modules.

Demo EPT modules Download EPT modules

Scroll

Контент Entity

12/05/2020, by maria

Эта шпаргалка содержит обзор часто используемых методов, классов и интерфейсов для объектов содержимого.

d8-entity-thumb

Скачать

/sites/default/files/drupal-content-entity-8.0.pdf

Контент-сущности наследуют многие из их поведения от сущностей. См. Работа с Entity API для этих общих функций.

Управление значениями поля

Создайте пользовательские поля, используя метод baseFieldDefinitions для вашего объекта Content.

  • Считать экземпляр пользовательского объекта в локальную переменную $Custom_Entity
  • Определите настраиваемое поле с именем «custom_field»
  • Храните некоторые данные
  •  

Пример кода

$custom_field_value = $Custom_Entity->custom_field->value;
// Perform some kind of data manipulation
$Custom_Entity->custom_field->value = $custom_field_value;
$Custom_Entity->save();

Примеры содержания Entity:

  • node
  • comment
  • user
Source URL:

Drupal’s online documentation is © 2000-2020 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.