My entity class has a MasterTitle relation and title getter:
public function getTitle()
$definition = $this->Definition;
$paramPhrase = \XF::phrase($this->getPhraseName());
return $paramPhrase->render('html', ['nameOnInvalid' => false]) ?: ($definition ? $definition->title : '');
The question is stated in the title of this thread.
@property int|null trophy_id
'trophy_id' => ['type' => self::UINT, 'autoIncrement' => true, 'nullable' => true]
Should I do the same with my entities?
What about string IDs? String UserField ID, for example, is not marked as nullable
Imagine we are creating an addon for removing all posts that match selected criteria. A list of available criteria:
Post has at least X likes
Post author has an X username
Post was edited at least X times
Post was edited no more than X times
Post was published before X
Post was published...
The question is simple. I hope it is.
I have three tables: criteria, params and criteria_params. The last one consists of two columns with criterion and param IDs. So it is a many-to-many relation between criteria and params. One criteria can have many params. One param can belong to any...
I am getting my entitites from database with this code:
Later I fetch the results:
$titles = $this->getTitleRepo()->getTitleListData()->fetch();
// >>>Sort by $title->title field?<<<
$viewParams = [
I want to create a list of titles (just like trophies) which users can select. The title enitity structure consists of title_id and the title phrase. But for title I want to use MasterTitle relation so I don't need title column.
It seems I have to create a table xf_addonid_title with only...
Hello. I see very strange behaviour. I have entity 'MissionRecord' with TO_MANY relation to 'NpcMissionRecord', if try load this entity with relation using default finder