You are here

protected function SkinsAddForm::elementOptions in Skinr 8.2

Return an array of element options for a module.

If no field type is provided, returns a nested array of all element options, keyed by module.

1 call to SkinsAddForm::elementOptions()
SkinsAddForm::form in skinr_ui/src/Form/SkinsAddForm.php
Gets the actual form array to be built.

File

skinr_ui/src/Form/SkinsAddForm.php, line 85
Contains Drupal\skinr_ui\Form\SkinsAddForm.

Class

SkinsAddForm

Namespace

Drupal\skinr_ui\Form

Code

protected function elementOptions($module = NULL) {
  $cache =& drupal_static(__FUNCTION__);
  if (!isset($cache)) {
    $config = skinr_get_config_info();
    $options = skinr_invoke_all('skinr_ui_element_options');
    foreach ($options as $type => $data) {
      $cache[$config[$type]] = $data;
    }
  }
  return $cache;
}