studioespresso/craft-exporter

View on GitHub
src/fields/MoneyFieldParser.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace studioespresso\exporter\fields;

class MoneyFieldParser extends BaseFieldParser
{
    public function getValue($element, $field)
    {
        $field = $element->getFieldValue($field['handle']);
        if ($field) {
            return $field->getAmount();
        }
    }

    public function getOptions(): array
    {
        return [];
    }

    public function getOptionType(): string|bool
    {
        return false;
    }

    protected function getOptionLabel(): string|bool
    {
        return false;
    }

    protected function getOptionDescription(): string|bool
    {
        return false;
    }
}