$c['formatter.contributions'] = function ($c) { return new Flow\Formatter\Contributions($c['permissions'], $c['formatter.revision']); }; $c['formatter.contributions.feeditem'] = function ($c) { return new Flow\Formatter\FeedItemFormatter($c['permissions'], $c['formatter.revision']); }; $c['query.board-history'] = function ($c) { return new Flow\Formatter\BoardHistoryQuery($c['storage'], $c['repository.tree'], $c['flow_actions']); }; // The RevisionFormatter holds internal state like // contentType of output and if it should include history // properties. To prevent different code using the formatter // from causing problems return a new RevisionFormatter every // time it is requested. $c['formatter.revision'] = $c->factory(function ($c) { global $wgFlowMaxThreadingDepth; return new Flow\Formatter\RevisionFormatter($c['permissions'], $c['templating'], $c['repository.username'], $wgFlowMaxThreadingDepth); }); $c['formatter.topiclist'] = function ($c) { return new Flow\Formatter\TopicListFormatter($c['url_generator'], $c['formatter.revision']); }; $c['formatter.topiclist.toc'] = function ($c) { return new Flow\Formatter\TocTopicListFormatter($c['templating']); }; $c['formatter.topic'] = function ($c) { return new Flow\Formatter\TopicFormatter($c['url_generator'], $c['formatter.revision']); }; $c['searchindex.updaters'] = function ($c) { // permissions for anon user $anonPermissions = new Flow\RevisionActionPermissions($c['flow_actions'], new User()); return array('topic' => new \Flow\Search\TopicUpdater($c['db.factory'], $anonPermissions, $c['loader.root_post']), 'header' => new \Flow\Search\HeaderUpdater($c['db.factory'], $anonPermissions)); };