XF 2.2 app() and em()

em = entity manager

has methods to fetch data for $id for the primary keys for example.
So i don't need to create a finder?

Entity:
$structure->primaryKey = 'node_id';

Job as example
$node = $app->em()->find('XF:Node', $nodeId');
 
Top Bottom