Skip to content

Commit d9456d5

Browse files
committed
wip:docs
1 parent 4abe0d8 commit d9456d5

1 file changed

Lines changed: 25 additions & 103 deletions

File tree

docs/core/Export.md

Lines changed: 25 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,15 @@ Admin Panel → Settings → Export
2525
InspireCMS supports several export types:
2626

2727
1. **Full Site Export**: All content, settings, and configuration
28-
2. **Content Export**: Selected content items and their related data
29-
3. **Document Type Export**: Document types with field groups and templates
30-
4. **Field Group Export**: Field groups and their field definitions
31-
5. **Template Export**: Templates and associated configuration
32-
6. **User Export**: User accounts and roles
33-
7. **Navigation Export**: Navigation structures
28+
2. **Document Type Export**: Document types with field groups and templates
29+
3. **Field Group Export**: Field groups and their field definitions
30+
4. **Template Export**: Templates and associated configuration
3431

3532
### Export Formats
3633

3734
Available export formats include:
3835

3936
- **JSON**: Complete structured data (default)
40-
- **CSV**: Tabular data for spreadsheet manipulation
41-
- **XML**: Structured data for systems requiring XML
42-
- **YAML**: Human-readable structured data
43-
- **SQL**: Direct database export for full backups
4437

4538
## Creating an Export
4639

@@ -53,7 +46,7 @@ To create a basic content export:
5346
3. Fill in the form:
5447
- **Name**: Descriptive name for the export
5548
- **Type**: Select export type (e.g., "Content Export")
56-
- **Format**: Choose format (e.g., JSON)
49+
- **Format**:Choose format (e.g., JSON)
5750
4. Configure additional options based on export type
5851
5. Click "Create Export"
5952

@@ -63,89 +56,14 @@ Depending on the export type, additional options may include:
6356

6457
- **Content Selection**: Which content items to include
6558
- **Include Dependencies**: Whether to include related records
66-
- **Language Options**: Which languages to export
67-
- **Include Media**: Whether to include related media files
68-
- **File Storage**: Where to store the export file
69-
- **Compression**: Whether to compress the export file
70-
71-
### Content Selection
72-
73-
For content exports, select items to include:
74-
75-
1. Browse the content tree
76-
2. Check boxes for content to include
77-
3. Use filters to find specific content:
78-
- Filter by document type
79-
- Filter by status
80-
- Filter by creation date
81-
- Filter by author
82-
83-
### Media Handling
84-
85-
Configure how media files are handled:
86-
87-
1. **Include Media Files**: Yes/No
88-
2. **Media Export Mode**:
89-
- **Reference Only**: Export only references to media
90-
- **Include Files**: Include actual media files in the export
91-
- **External URLs**: Replace media references with public URLs
9259

9360
## Executing Exports
9461

95-
### Immediate Execution
96-
97-
For small to medium exports:
98-
9962
1. Create the export configuration
100-
2. Click "Export Now"
63+
2. Click "Export"
10164
3. Wait for the export to complete
10265
4. Download the export file
10366

104-
### Background Execution
105-
106-
For larger exports:
107-
108-
1. Create the export configuration
109-
2. Click "Schedule Export"
110-
3. The system processes the export in the background
111-
4. Receive notification when export is complete
112-
5. Download the export file from the export history
113-
114-
### Scheduled Exports
115-
116-
For regular backups or data syncing:
117-
118-
1. Create the export configuration
119-
2. Enable "Recurring Export"
120-
3. Set the schedule (daily, weekly, monthly)
121-
4. Configure retention settings (how many exports to keep)
122-
123-
## Programmatic Exports
124-
125-
Create exports programmatically:
126-
127-
```php
128-
use SolutionForest\InspireCms\Models\Export;
129-
use SolutionForest\InspireCms\Services\ExportServiceInterface;
130-
131-
// Create export record
132-
$export = new Export();
133-
$export->name = 'Programmatic Export';
134-
$export->type = 'content';
135-
$export->format = 'json';
136-
$export->options = [
137-
'content_ids' => ['550e8400-e29b-41d4-a716-446655440000', '550e8400-e29b-41d4-a716-446655440001'],
138-
'include_media' => true,
139-
];
140-
$export->save();
141-
142-
// Execute export
143-
app(ExportServiceInterface::class)->execute($export);
144-
145-
// Get result
146-
$exportFile = $export->getExportFilePath();
147-
```
148-
14967
## Custom Exporters
15068

15169
InspireCMS allows you to create custom exporters:
@@ -184,12 +102,14 @@ Register your custom exporter:
184102

185103
```php
186104
// config/inspirecms.php
187-
'exports' => [
188-
'exporters' => [
189-
\SolutionForest\InspireCms\Exports\Exporters\ContentExporter::class,
190-
\SolutionForest\InspireCms\Exports\Exporters\DocumentTypeExporter::class,
191-
// Add your custom exporter
192-
\App\Exports\CustomExporter::class,
105+
'import_export' => [
106+
'exports' => [
107+
'exporters' => [
108+
\SolutionForest\InspireCms\Exports\Exporters\ContentExporter::class,
109+
\SolutionForest\InspireCms\Exports\Exporters\DocumentTypeExporter::class,
110+
// Add your custom exporter
111+
\App\Exports\CustomExporter::class,
112+
],
193113
],
194114
],
195115
```
@@ -212,22 +132,24 @@ For large sites, consider these performance optimizations:
212132
3. **Selective Exports**: Export only what's needed rather than everything
213133
4. **Resource Allocation**: Increase PHP memory limits for large exports
214134

215-
```php
216-
// For very large exports, set in your .env
217-
EXPORT_MEMORY_LIMIT=2G
218-
EXPORT_TIMEOUT=3600
219-
```
220-
221135
## Export File Storage
222136

223137
Configure where export files are stored:
224138

225139
```php
226140
// config/inspirecms.php
227-
'exports' => [
228-
'disk' => 'local', // or 's3', 'sftp', etc.
229-
'directory' => 'exports',
230-
'retention_days' => 30, // Automatically delete files after 30 days
141+
'models' => [
142+
'prunable' => [
143+
'export' => [
144+
'interval' => 5, // Automatically delete files after 5 days
145+
],
146+
],
147+
],
148+
'import_export' => [
149+
'exports' => [
150+
'disk' => 'local', // or 's3', 'sftp', etc.
151+
'directory' => 'exports',
152+
],
231153
],
232154
```
233155

0 commit comments

Comments
 (0)