trait ValueConvertTrait in Views OAI-PMH 8
Hierarchy
- trait \Drupal\views_oai_pmh\Service\ValueConvertTrait
1 file declares its use of ValueConvertTrait
- Record.php in src/
Plugin/ views/ style/ Record.php
File
- src/
Service/ ValueConvertTrait.php, line 8
Namespace
Drupal\views_oai_pmh\ServiceView source
trait ValueConvertTrait {
/**
*
*/
public function __construct() {
}
/**
*
*/
public function convert($currentValue, $newValue) {
$output = [];
if (is_array($currentValue)) {
foreach ($currentValue as $id => $value) {
$output[] = $value;
}
}
else {
$output[] = $currentValue;
}
$output[] = $newValue;
return $output;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ValueConvertTrait:: |
public | function | ||
ValueConvertTrait:: |
public | function | 1 |