Usually we use this class constructor:
class MyObject extends \ElggObject {
const SUBTYPE = 'my_object';
protected function initializeAttributes() {
parent::initializeAttributes();
$this->attributes['subtype'] = self::SUBTYPE;
}
}
Yes, i have this class constructor. "ElggCoaching" with subtype as "coaching"
Rohit,
It looks like you did everything correct.
You mentioned that your plugin is still disabled, that is why you get the warning. The system can't find your custom class. Once you plugin is active it should go away.
However, I believe I may also need to migrate existing river items, because even though the updated class is
ElggCoaching, the entities are still being treated asElggObjectinstead of the new class.
No need, once you activate your plugin the system will handle this. (There is no reference in the river table to an Entity class).
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.