XF 2.0 how to use xf-dev:generate-entity-dw

turkyalawlqy

Active member
Hi,
I tried to use the following command

Code:
php cmd.php xf-dev:generate-entity-dw Turki:Ranks

After execution I see the following error

Code:
Fatal error: Class 'XenForo_DataWriter' not found

As well as those who assist the implementation of the matter

Turki.
 
Haven’t seen that command, but data writers don’t exist anymore, they were replaced by entities. I’m guessing this might convert an xf1 data writer to an xf2 entity
 
Correct. It was perhaps used internally initially to write out some of the default Entity files when we first started developing.

You can sort of see how it works with this command:
Code:
xf-dev:generate-entity-dw XF:Phrase
XF:Phrase in this case refers to the file in the location src/XF/Legacy/DataWriter/Phrase.php.
 
Please explain.
In the XF 1 add-on, there is DataWriter:

library/Company/Addon/XenForo/DataWriter/Forum
and
library/Company/Addon/XenForo/DataWriter/Discussion/Thread

If I understand correctly, using the xf-dev:generate-entity-dw, can be converted to the format used in the XF2.

But you have any questions:
1. Where should the files be located (preferably a full directory structure)?
2. What should the command look like based on the specified structure?
 
Back
Top Bottom