summaryrefslogtreecommitdiff
path: root/doc/en_US/plugin-metadata.markdown
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2018-04-06 10:54:58 -0700
committerFrédéric Guillot <fred@kanboard.net>2018-04-06 10:54:58 -0700
commit0b306fa60ad84ea077111e0ff7b59208ba7bc8a3 (patch)
tree5d8941b5950ede2db8ca3fba0213792db0f07a50 /doc/en_US/plugin-metadata.markdown
parentac11220a1aa7ae30b8827d9bbf221888d3edd0a7 (diff)
Move documentation to https://docs.kanboard.org/
Diffstat (limited to 'doc/en_US/plugin-metadata.markdown')
-rw-r--r--doc/en_US/plugin-metadata.markdown42
1 files changed, 0 insertions, 42 deletions
diff --git a/doc/en_US/plugin-metadata.markdown b/doc/en_US/plugin-metadata.markdown
deleted file mode 100644
index 49da0ac1..00000000
--- a/doc/en_US/plugin-metadata.markdown
+++ /dev/null
@@ -1,42 +0,0 @@
-Metadata
-========
-
-You can attach metadata for each project, task, user or for the whole application.
-Metadata are custom fields, it's a key/value table.
-
-For example your plugin can store external information for a task or new settings for a project.
-Basically that allow you to extend the default fields without having to create new tables.
-
-Attach metadata to tasks and remove them
-------------------------
-
-```php
-
-// Return a dictionary of metadata (keys/values) for the $task_id
-$this->taskMetadataModel->getAll($task_id);
-
-// Get a value only for a task
-$this->taskMetadataModel->get($task_id, 'my_plugin_variable', 'default_value');
-
-// Return true if the metadata my_plugin_variable exists
-$this->taskMetadataModel->exists($task_id, 'my_plugin_variable');
-
-// Create or update metadata for the task
-$this->taskMetadataModel->save($task_id, ['my_plugin_variable' => 'something']);
-
-// Remove a metadata from a project
-$this->projectMetadataModel->remove($project_id, my_plugin_variable);
-```
-
-Metadata types
---------------
-
-- TaskMetadata: `$this->taskMetadataModel`
-- ProjectMetadata: `$this->projectMetadataModel`
-- UserMetadata: `$this->userMetadataModel`
-- Settings/Config: `$this->configModel`
-
-Notes
------
-
-- Always prefix the metadata name with your plugin name