PHP code example of drufony / yaml-module

1. Go to this page and download the library: Download drufony/yaml-module library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

drufony / yaml-module example snippets



  $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,
      ),
    )),
  );