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.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758<?php
namespace studioespresso\exporter\models;
use Solspace\Freeform\Elements\Submission;use Solspace\Freeform\Freeform;
class ExportableFreeformSubmissionModel extends ExportableElementTypeModel{ /** * References the class of the Element Type * @phpstan-ignore-next-line * @var string */ public $elementType = Submission::class;
/** * Label of the element type * @var string */ public string $elementLabel = "Freeform Submissions";
/** * This function defines the element's attributes you want to make exportable * @return array */ public function getElementAttributes(): bool|array { return [ 'id' => 'ID', 'title' => 'Title', ]; }
/** * This function defines the groups in which the element can be groups. Like sections for entries, forms for submissions , etc * @return array */ public function getGroup(): array { return [ "label" => "Form", "parameter" => "formId", "items" => Freeform::getInstance()->forms->getAllForms(), // @phpstan-ignore-line "nameProperty" => "name", ]; }
/** * If the element's groups have an additional sub-group, define those here * @return bool|array */ public function getSubGroup(): bool|array { return false; }}