CrispinP
Well-known member
hi folks,
Continuing on with my first add-on...
I have the following in my class (which works)
So far, so good.
however, when I try get the resource... I get nothing back.
I have tried with both resourceid and resourceUpdateId
I'm using this http://fabrikar.com/forums/docs/classes/XenForo_Model_Attachment.html for guidance as well as digging through the other code. Is there a better way?
Am I on the right track to get the attachment out? and if so, why does my test return nothing?
TIA
Crispin
Continuing on with my first add-on...
I have the following in my class (which works)
Code:
public function save()
{
// call parent
parent::save();
// get resourceId
$resourceId = $this->get('resource_id');
//get the update id (just in case for now)
$resourceUpdateId = $this->get('resource_update_id');
So far, so good.
however, when I try get the resource... I get nothing back.
Code:
$bla = $this->getModelFromCache('XenForo_Model_Attachment')->getAttachmentsByContentId('resource_update', $resourceId);
I have tried with both resourceid and resourceUpdateId
I'm using this http://fabrikar.com/forums/docs/classes/XenForo_Model_Attachment.html for guidance as well as digging through the other code. Is there a better way?
Am I on the right track to get the attachment out? and if so, why does my test return nothing?
TIA
Crispin