<commit_before><?php

namespace User;

class Bootstrap extends \Reborn\Module\AbstractBootstrap
{

	public function boot()
	{
		\Translate::load('user::user');
		\Translate::load('user::permission');
		\Translate::load('user::group');
	}

	public function adminMenu(\Reborn\Util\Menu $menu, $modUri)
	{
		$childs = array();

		$childs[] = array('title' => t('user::user.menu'), 'uri' => '');
		if (user_has_access('user.group')) {
			$childs[] = array('title' => t('user::group.menu'), 'uri' => 'group');
		}
		if (user_has_access('user.permission')) {
			$childs[] = array('title' => t('user::permission.menu'), 'uri' => 'permission');
		}
			
		$menu->group($modUri, t('navigation.user_management'), 'icon-users', 27, $childs);
	}

	public function settings()
	{
		return array();
	}

	public function moduleToolbar()
	{
		$uri = \Uri::segment(3);

		if( $uri != 'permission' )
		{
			if( $uri == 'group' and user_has_access('user.group.create') ) {
				$mod_toolbar = array(
					'add_group'	=> array(
						'url'	=> 'user/group/create',
						'name'	=> t('user::group.modToolbar.name'),
						'info'	=> t('user::group.modToolbar.info'),
						'class'	=> 'add'
					)
				);
			} else {
				if (user_has_access('user.create')) {
					$mod_toolbar = array(
						'add'	=> array(
							'url'	=> 'user/create',
							'name'	=> t('user::user.modToolbar.name'),
							'info'	=> t('user::user.modToolbar.info'),
							'class'	=> 'add'
						),
					);
				} else {
					$mod_toolbar = array();
				}
			}
		}
		else {
			$mod_toolbar = array();
		}

		return $mod_toolbar;
	}

	public function register()
	{
		// Laster
		require __DIR__.DS."helpers.php";

		\Event::on('reborn.dashboard.widgets.rightcolumn', function(){
			return \User\Lib\Helper::dashboardWidget();
		});
	}
}
<commit_msg>Update user bootstrap<commit_after><?php

namespace User;

class Bootstrap extends \Reborn\Module\AbstractBootstrap
{

	public function boot()
	{
		\Translate::load('user::user');
		\Translate::load('user::permission');
		\Translate::load('user::group');
	}

	public function adminMenu(\Reborn\Util\Menu $menu, $modUri)
	{
		$childs = array();

		$childs[] = array('title' => t('user::user.menu'), 'uri' => '');
		if (user_has_access('user.group')) {
			$childs[] = array('title' => t('user::group.menu'), 'uri' => 'group');
		}
		if (user_has_access('user.permission')) {
			$childs[] = array('title' => t('user::permission.menu'), 'uri' => 'permission');
		}
			
		$menu->group($modUri, t('navigation.user_management'), 'icon-users', 50, $childs);
	}

	public function settings()
	{
		return array();
	}

	public function moduleToolbar()
	{
		$uri = \Uri::segment(3);

		if( $uri != 'permission' )
		{
			if( $uri == 'group' and user_has_access('user.group.create') ) {
				$mod_toolbar = array(
					'add_group'	=> array(
						'url'	=> 'user/group/create',
						'name'	=> t('user::group.modToolbar.name'),
						'info'	=> t('user::group.modToolbar.info'),
						'class'	=> 'add'
					)
				);
			} else {
				if (user_has_access('user.create')) {
					$mod_toolbar = array(
						'add'	=> array(
							'url'	=> 'user/create',
							'name'	=> t('user::user.modToolbar.name'),
							'info'	=> t('user::user.modToolbar.info'),
							'class'	=> 'add'
						),
					);
				} else {
					$mod_toolbar = array();
				}
			}
		}
		else {
			$mod_toolbar = array();
		}

		return $mod_toolbar;
	}

	public function register()
	{
		// Laster
		require __DIR__.DS."helpers.php";

		\Event::on('reborn.dashboard.widgets.rightcolumn', function(){
			return \User\Lib\Helper::dashboardWidget();
		});
	}
}

{'fraction_non_alphanumeric': 0.21313299944351696, 'fraction_numerical': 0.001669449081803005, 'mean_word_length': 3.2848629320619787, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 37, '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': '6590927', 'n_tokens_mistral': 1568, 'n_tokens_neox': 1302, 'n_words': 214}