Modifying a custom entity

Status
This content is read-only, or is not open for further replies.

Anatoliy

Guest
offline
So, following the Building with XenForo 2 videos I created a Notes add-on. Now I would like to modify it to my needs. A simple modification - to replace a 'Title' field with a 'Fishing date' field. As I understand I need to modify my custom entity and also a setup file. So regarding a custom entity - I just replace
Code:

'title' => ['type' => self::STR, 'maxLength' => 255, 'required' => true, 'censor' => true],
with
Code:

'fishing_date' => ['type' => self::UINT, 'default' => \XF::$time],
...

Read more

Continue reading...
 
Liked by:
Status
This content is read-only, or is not open for further replies.
Top Bottom