drufony/yaml-module

YAML module

Installs: 70

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 0

Type:drupal-module

1.0.3 2023-09-28 15:48 UTC

This package is auto-updated.

Last update: 2024-10-28 17:56:13 UTC


README

Creates a YAML form element which allows complex configuration to be added in a single text area.

Example

<?php
  $form['module_settings'] = array(
    '#type' => 'yaml',
    '#title' => t('Settings'),
    '#default_value' => variable_get('module_settings', array(
      'something' => TRUE,
      'another_thing' => 100,
      'something_else' => 'this is a string',
      'list' => array(123, 456, 789),
      'deeper' => array(
        'top' => TRUE,
        'left' => FALSE,
      ),
    )),
  );