Lack of interest Node Datawriters

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

xf_phantom

Well-known member
It would be nice, if the node_type_id would be set automatically by the forum/page/category/linkforum/etc... datawriter, so we don't have to set this field when using the forum/page/category/linkforum datawriter.

PHP:
/** @var XenForo_DataWriter_Forum $nodeDw */
         $nodeDw = XenForo_DataWriter::create('XenForo_DataWriter_Forum');
         $nodeDw->set('title', $faker->forumTitle);
// why do i need the following line?
// i'm already using the forum datawriter, he should handle this for me
         $nodeDw->set('node_type_id', 'Forum');
         $nodeDw->save();
 
Last edited:
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
Actually that is why there are different datawriters :) Of course it's usefult to auto-populate all unchangeable input from the writer.
 
Top Bottom