public function HideNoString::access in Field Formatter Condition 8
Access control function.
Parameters
array $build: The current build array.
string $field: The current field name.
array $settings: The current settings array.
Overrides FieldFormatterConditionBase::access
File
- src/
Plugin/ Field/ FieldFormatter/ Condition/ HideNoString.php, line 52
Class
- HideNoString
- The plugin for check empty fields.
Namespace
Drupal\fico\Plugin\Field\FieldFormatter\ConditionCode
public function access(&$build, $field, $settings) {
$found = fico_string_search($build, $field, $settings);
if ($found == FALSE) {
$build[$field]['#access'] = FALSE;
}
}