You are here

public function Registrants::getInfo in RNG - Events and Registrations 3.x

Same name and namespace in other branches
  1. 8.2 src/Element/Registrants.php \Drupal\rng\Element\Registrants::getInfo()
  2. 8 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 35

Class

Registrants
Provides a form element for a registrant and person association.

Namespace

Drupal\rng\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#input' => TRUE,
    '#process' => [
      [
        $class,
        'processIdentityElement',
      ],
    ],
    '#element_validate' => [
      [
        $class,
        'validateIdentityElement',
      ],
      [
        $class,
        'validateRegisterable',
      ],
      [
        $class,
        'validateRegistrantCount',
      ],
      [
        '\\Drupal\\rng\\Form\\RegistrantFields',
        'validateForm',
      ],
    ],
    '#pre_render' => [
      [
        $class,
        'preRenderRegistrants',
      ],
    ],
    // Required.
    '#event' => NULL,
    '#registration' => 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.
    // DEPRECATED - DETERMINED BY REGISTRATION OBJECT
    '#registrants_minimum' => NULL,
    // Maximum number of registrants (integer), or NULL for no maximum.
    // DEPRECATED - DETERMINED BY REGISTRATION OBJECT
    '#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' => [],
  ];
}