aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggAnnotation.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes/ElggAnnotation.php')
-rw-r--r--engine/classes/ElggAnnotation.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/engine/classes/ElggAnnotation.php b/engine/classes/ElggAnnotation.php
index cdcfe363f..d99f5fc9a 100644
--- a/engine/classes/ElggAnnotation.php
+++ b/engine/classes/ElggAnnotation.php
@@ -14,13 +14,19 @@
*/
class ElggAnnotation extends ElggExtender {
+ protected function initializeAttributes() {
+ parent::initializeAttributes();
+
+ $this->attributes['type'] = 'annotation';
+ }
+
/**
* Construct a new annotation, optionally from a given id value or db object.
*
* @param mixed $id The annotation ID
*/
function __construct($id = null) {
- $this->attributes = array();
+ $this->initializeAttributes();
if (!empty($id)) {
if ($id instanceof stdClass) {
@@ -35,8 +41,6 @@ class ElggAnnotation extends ElggExtender {
foreach ($objarray as $key => $value) {
$this->attributes[$key] = $value;
}
-
- $this->attributes['type'] = "annotation";
}
}
}