aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr/sys/models.php
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2012-05-20 13:00:31 +0200
committerKevin Chabowski <kevin@kch42.de>2012-05-20 13:00:31 +0200
commit793b0e31beb22fe33402c8a9ceebf47a5a950635 (patch)
treee85697db943d0aa4b32821125324fbd1ba557616 /ratatoeskr/sys/models.php
parent1bfb9653d6e9139445ca9cde5808228c3b16399e (diff)
downloadratatoeskr-cms-793b0e31beb22fe33402c8a9ceebf47a5a950635.tar.gz
ratatoeskr-cms-793b0e31beb22fe33402c8a9ceebf47a5a950635.tar.bz2
ratatoeskr-cms-793b0e31beb22fe33402c8a9ceebf47a5a950635.zip
Plugins can now hook into the Article editor.feature-plugin-articledata
* Plugins can display additional fields in the article editor. * Plugins can perform actions when saving an article and even veto the saving. * Plugins can get their ArticleExtradata objects.
Diffstat (limited to 'ratatoeskr/sys/models.php')
-rw-r--r--ratatoeskr/sys/models.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/ratatoeskr/sys/models.php b/ratatoeskr/sys/models.php
index 9f3a96a..3cda168 100644
--- a/ratatoeskr/sys/models.php
+++ b/ratatoeskr/sys/models.php
@@ -2606,6 +2606,21 @@ WHERE " . implode(" AND ", $subqueries) . " $sorting");
}
/*
+ * Function: get_extradata
+ * Get the extradata for this article and the given plugin.
+ *
+ * Parameters:
+ * $plugin_id - The ID of the plugin.
+ *
+ * Returns:
+ * An <ArticleExtradata> object.
+ */
+ public function get_extradata($plugin_id)
+ {
+ return new ArticleExtradata($this->id, $plugin_id);
+ }
+
+ /*
* Function: save
*/
public function save()