public function Registrants::getInfo in RNG - Events and Registrations 8
Same name and namespace in other branches
- 8.2 src/Element/Registrants.php \Drupal\rng\Element\Registrants::getInfo()
- 3.x src/Element/Registrants.php \Drupal\rng\Element\Registrants::getInfo()
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/ Registrants.php, line 33
Class
- Registrants
- Provides a form element for a registrant and person association.
Namespace
Drupal\rng\ElementCode
public function getInfo() {
$class = get_class($this);
return [
'#input' => TRUE,
'#process' => [
[
$class,
'processIdentityElement',
],
],
'#element_validate' => [
[
$class,
'validateIdentityElement',
],
[
$class,
'validateRegisterable',
],
[
$class,
'validateRegistrantCount',
],
],
'#pre_render' => array(
array(
$class,
'preRenderRegistrants',
),
),
// Required.
'#event' => NULL,
'#attached' => [
'library' => [
'rng/rng.elements.registrants',
],
],
// Use container so classes are applied.
'#theme_wrappers' => [
'container',
],
// Allow creation of which entity types + bundles:
// Array of bundles keyed by entity type.
'#allow_creation' => [],
// Allow referencing existing entity types + bundles:
// Array of bundles keyed by entity type.
'#allow_reference' => [],
// Minimum number of registrants (integer), or NULL for no minimum.
'#registrants_minimum' => NULL,
// Maximum number of registrants (integer), or NULL for no maximum.
'#registrants_maximum' => NULL,
// Get form display modes used when creating entities inline.
// An array in the format: [entity_type][bundle] = form_mode_id
'#form_modes' => [],
];
}