Open Mark-H opened 9 years ago
Would also be good to do this for template variable values. Either store TV values as subdirectory data (less optimal) or within the resource's html file (more optimal, from an editing perspective).
Maybe with one-to-(one/many) relations we could skip adding extra directories and files, instead adding it right in to the main object.. like the example with the package/versions, that could in redactor.yaml
contain a versions
array with all the versions..
And with plugin events (#14) that would be like..
data:
packages:
class: modPlugin
primary: name
relations:
events:
class: modPluginEvent
alias: Events
name: MyPlugin
description: best one ever
events:
-
event: OnHandleRequest
priority: 5
propertyset: 0
-
event: OnDocFormRender
priority: 2
propertyset: 0
-----
$hello = 'Hi!';
$world = 'Earth';
$event->output($hello . $world);
It would be nice to - in a similar way the
content
works - make use of subdirectories to store relations.A model mpPackage with one-to-many mpVersion objects could be represented in the
.gitify
like this:which would then result in a directory structure like this for a one-to-many relation:
A one-to-one relation, for example modUser/modUserProfile, could be in the .gitify file like this:
As it's one-to-one, there would (ideally) be no need to specify a primary. Gitify could fetch that from the model and base it off the modUser record.
The profile file would be stored with the name from the reference ("profile") in a directory with the primary from the modUser, like so:
Of course combinations and multiple relations need to be supported.