Property.php in Form Builder 7.2
File
examples/src/Property.php
View source
<?php
namespace Drupal\form_builder_examples;
use Drupal\form_builder\PropertyBase;
class Property extends PropertyBase {
protected $property;
protected $params;
protected $formTypeName;
public function form(&$form_state, $element) {
$e = $element
->render();
if (isset($this->params['form']) && function_exists($this->params['form'])) {
$function = $this->params['form'];
$p = $this->property;
$e['#' . $p] = isset($e['#' . $p]) ? $e['#' . $p] : NULL;
return $function($form_state, $this->formTypeName, $e, $p);
}
return array();
}
}
Classes
Name |
Description |
Property |
Form builder property for the example form type. |