Skip to content

Instantly share code, notes, and snippets.

@Bruno17
Bruno17 / snippet.rebuildSchemaFromMap.php
Last active November 19, 2017 20:53
MODX Revolution - snippet for recreating xPDO - schema from map-files
<?php
class rebuildSchemaFromMap{
public $packageName = '';
public $packagePath = '';
public $modelPath = '';
public $dbtype = '';
public $defaultEngine = 'MyISAM';
public $objects= array();
<?php
class MyControllerFahrten extends modRestController {
public $classKey = 'fbuchFahrt';
public $defaultSortField = 'date';
public $defaultSortDirection = 'ASC';
public function beforeDelete() {
throw new Exception('Unauthorized', 401);
}
@Bruno17
Bruno17 / template.html
Created June 19, 2024 20:32
Very simple Example for uppy uploader on MODX frontpage
<!DOCTYPE html>
<html lang="[[++cultureKey]]" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- @todo: fill with your company info or remove -->
<meta name="description" content="">
<meta name="author" content="">