public function YamlFormManagedFileBase::isEnabled in YAML Form 8
Checks if element is enabled.
Return value
bool TRUE if the element is enabled.
Overrides YamlFormElementBase::isEnabled
File
- src/
Plugin/ YamlFormElement/ YamlFormManagedFileBase.php, line 63
Class
- YamlFormManagedFileBase
- Provides a base class form 'managed_file' elements.
Namespace
Drupal\yamlform\Plugin\YamlFormElementCode
public function isEnabled() {
if (!parent::isEnabled()) {
return FALSE;
}
// Disable managed file element is there are no visible stream wrappers.
$scheme_options = self::getVisibleStreamWrappers();
return empty($scheme_options) ? FALSE : TRUE;
}