public function InlineEntityForm::getInfo in Inline Entity Form 8
Returns the element properties for this element.
Return value
array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format.
Overrides ElementInterface::getInfo
File
- src/
Element/ InlineEntityForm.php, line 36
Class
- InlineEntityForm
- Provides an inline entity form element.
Namespace
Drupal\inline_entity_form\ElementCode
public function getInfo() {
$class = get_class($this);
return [
'#ief_id' => '',
'#entity_type' => NULL,
'#bundle' => NULL,
'#langcode' => NULL,
// Instance of \Drupal\Core\Entity\EntityInterface. If NULL, a new
// entity will be created.
'#default_value' => NULL,
// The form mode used to display the entity form.
'#form_mode' => 'default',
// Will create a new revision if set to TRUE.
'#revision' => FALSE,
// Will save entity on submit if set to TRUE.
'#save_entity' => TRUE,
// 'add', 'edit' or 'duplicate'.
'#op' => NULL,
'#process' => [
// Core's #process for groups, don't remove it.
[
$class,
'processGroup',
],
// InlineEntityForm's #process must run after the above ::processGroup
// in case any new elements (like groups) were added in alter hooks.
[
$class,
'processEntityForm',
],
],
'#element_validate' => [
[
$class,
'validateEntityForm',
],
],
'#ief_element_submit' => [
[
$class,
'submitEntityForm',
],
],
'#theme_wrappers' => [
'container',
],
'#pre_render' => [
// Core's #pre_render for groups, don't remove it.
[
$class,
'preRenderGroup',
],
],
];
}