Something went wrong. Try again.
Element Exporter makes exporting data from your Craft CMS website easy and repeatable, with events for custom data parsing and elements.
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738<?php
namespace studioespresso\exporter\fields;
use Craft;
class OptionsFieldParser extends BaseFieldParser{ public function getValue($element, $field) { $property = $field['property'] ?? 'value'; return $element->getFieldValue($field['handle'])->$property; }
public function getOptions(): array { return [ 'label' => 'Label', 'value' => 'Value', ]; }
public function getOptionType(): string|bool { return "select"; }
public function getOptionLabel(): string|bool { return Craft::t('exporter', 'Select field property'); }
public function getOptionDescription(): string|bool { return Craft::t('exporter', 'Select which property you want to export.'); }}