public static function PatternSettings::hasSettings in UI Patterns Settings 8
Same name and namespace in other branches
- 8.2 src/Element/PatternSettings.php \Drupal\ui_patterns_settings\Element\PatternSettings::hasSettings()
Whereas pattern has settings or not.
Return value
bool TRUE or FALSE.
1 call to PatternSettings::hasSettings()
- PatternSettings::processSettings in src/
Element/ PatternSettings.php - Process settings.
File
- src/
Element/ PatternSettings.php, line 84
Class
- PatternSettings
- Renders a pattern element.
Namespace
Drupal\ui_patterns_settings\ElementCode
public static function hasSettings($element) {
$definition = UiPatterns::getPatternDefinition($element['#id']);
$settings = UiPatternsSettings::getPatternDefinitionSettings($definition);
if ($definition != NULL && count($settings) != 0) {
return TRUE;
}
else {
return FALSE;
}
}