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