You are here

public function YamlFormElementBase::hasProperty in YAML Form 8

Determine if an element supports a specified property.

Parameters

string $property_name: An element's property name.

Return value

bool TRUE if the element supports a specified property.

Overrides YamlFormElementInterface::hasProperty

3 calls to YamlFormElementBase::hasProperty()
NumericBase::prepare in src/Plugin/YamlFormElement/NumericBase.php
Prepare an element to be rendered within a form.
YamlFormElementBase::hasWrapper in src/YamlFormElementBase.php
Checks if the element has a wrapper.
YamlFormElementBase::prepare in src/YamlFormElementBase.php
Prepare an element to be rendered within a form.

File

src/YamlFormElementBase.php, line 215

Class

YamlFormElementBase
Provides a base class for a form element.

Namespace

Drupal\yamlform

Code

public function hasProperty($property_name) {
  $default_properties = $this
    ->getDefaultProperties();
  return isset($default_properties[$property_name]);
}