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.
12345678910111213141516171819202122232425<?php
namespace studioespresso\exporter\variables;
use Craft;use studioespresso\exporter\elements\db\ExportElementQuery;use studioespresso\exporter\elements\ExportElement;use yii\base\Behavior;
/** * The class name isn't important, but we've used something that describes * how it is applied, rather than what it does. * * You are only apt to need a single behavior, even if your plugin or module * provides multiple element types. */class CraftVariableBehavior extends Behavior{ public function exports(array $criteria = []): ExportElementQuery { // Create a query via your element type, and apply any passed criteria: return Craft::configure(ExportElement::find(), $criteria); }}