<commit_before><?php
namespace Likeme\SystemBundle\Menu;

use Symfony\Component\Security\Core\SecurityContextInterface;

use Knp\Menu\FactoryInterface;
use Symfony\Component\HttpFoundation\Request;

class MenuBuilder { 

	private $factory;
	
    protected $securityContext;
	
	/**
	 * @param FactoryInterface $factory
	 */
	public function __construct(FactoryInterface $factory, SecurityContextInterface $securityContext) {
		$this->factory = $factory;
		$this->securityContext = $securityContext;
	}

	public function createMainMenu(Request $request) {
		
		$menu = $this->factory->createItem('root');

		$menu->addChild('Home', array('route' => 'home'));
		$menu->addChild('Profil', array('route' => 'fos_user_profile_show'));
		$menu->addChild('Registrieren',	array('route' => 'fos_user_registration_register'));

		if( $this->securityContext->isGranted('IS_AUTHENTICATED_FULLY') ){
			$menu->addChild('Logout', array('route' => 'fos_user_security_logout'));<commit_msg>Remove registration from menu<commit_after><?php
namespace Likeme\SystemBundle\Menu;

use Symfony\Component\Security\Core\SecurityContextInterface;

use Knp\Menu\FactoryInterface;
use Symfony\Component\HttpFoundation\Request;

class MenuBuilder { 

	private $factory;
	
    protected $securityContext;
	
	/**
	 * @param FactoryInterface $factory
	 */
	public function __construct(FactoryInterface $factory, SecurityContextInterface $securityContext) {
		$this->factory = $factory;
		$this->securityContext = $securityContext;
	}

	public function createMainMenu(Request $request) {
		
		$menu = $this->factory->createItem('root');

		$menu->addChild('Home', array('route' => 'home'));
		$menu->addChild('Profil', array('route' => 'fos_user_profile_show'));

		if( $this->securityContext->isGranted('IS_AUTHENTICATED_FULLY') ){
			$menu->addChild('Logout', array('route' => 'fos_user_security_logout'));
{'fraction_non_alphanumeric': 0.1488, 'fraction_numerical': 0.0, 'mean_word_length': 6.299610894941634, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4895172', 'n_tokens_mistral': 601, 'n_tokens_neox': 552, 'n_words': 95}