You are here

public function FormBuilderElementBase::getProperties in Form Builder 7

Get a list of properties available for this element.

Return value

An associative array of properties keyed by the property name. Property classes must implementing FormBuilderPropertyInterface.

Overrides FormBuilderElementInterface::getProperties

3 calls to FormBuilderElementBase::getProperties()
FormBuilderElementBase::configurationForm in ./form_builder.classes.inc
Get the configuration form for this element.
FormBuilderElementBase::configurationSubmit in ./form_builder.classes.inc
Submit handler for the configuration form.
FormBuilderWebformElement::setProperty in modules/webform/form_builder_webform.classes.inc
Set the value of a property.

File

./form_builder.classes.inc, line 836

Class

FormBuilderElementBase

Code

public function getProperties() {
  $return = array();
  $properties = $this->form
    ->getProperties();

  // Order of the properties is important because of a form-API bug.
  // See: https://www.drupal.org/node/990218.
  foreach ($this->params['properties'] as $name) {
    if (isset($properties[$name])) {
      $return[$name] = $properties[$name];
    }
  }
  return $return;
}