Ejemplo n.º 1
0
 /**
  * To allow the greatest flexibility in the definition of this element,
  * a keyed array is passed.
  *
  * Required keys
  * * **label:** The label of the field.
  * * **type:** dropdown|radio|checkbox
  * * **name:** The name of the field for POST data
  * * **options:** An array of key-value pairs where the "key" is the option POST value and "value" is the label for the option.
  *
  * Optional keys
  * * **required:** true|false (default is false) - Whether the field is required or not.
  * * **hint:** An arbitrary non-block HTML string describing the purpose of the field.
  * * **errorMessage:** An arbitrary non-block HTML string describing the error found.
  * * **selected:** An array of option values to mark as selected/checked. Note: Only the checkbox type allows multiple selections.
  * * **sr-only:** true|false (default is false) Whether the label should be for screen-readers only.
  * 
  * @param  [type] $config [description]
  * @return [type]         [description]
  */
 public static function select($config)
 {
     return Select::build($config);
 }
Ejemplo n.º 2
0
 public static function build($config)
 {
     return Select::openContainer($config) . Select::openSelect($config) . Select::options($config) . Select::closeSelect($config) . Select::closeContainer($config);
 }