<commit_before># Pages for Extension

## Table of Content
- [Introduction](#introduction)
- [Add a Page for Administrators](#manage)
- [Add a Page for Users](#page)

<a name="introduction"></a>
## Introduction

Orchestra wouldn't be useful if you can't create a custom page on Orchestra Administrator Panel. For this purpose, we introduce two event listener to add 
dynamic page for either user and administrator.

<a name="manage"></a>
## Add a Page for Administrators

Use `"orchestra.manages: ..."` event listener to add a custom page only accessible by administrator user account. Here's an example of a custom manage page for oneauth.

	<?php

	Event::listen('orchestra.started: backend', function ()
	{
		// Add a custom menu
		$menu = Orchestra\Core::menu();

		$menu->add('hello', 'after:home')
			->title('Hello World')
			->link(handles('orchestra::manages/oneauth/hello'));
	});

	Event::listen('orchestra.manages: oneauth.hello', function ()
	{
		return 'Hello world';
	});

<a name="page"></a>
## Add a Page for Users

Use `"orchestra.pages: ..."` event listener to add a custom page viewable by all logged user, it work similarly as [Add a Page for Administrator](#manage).

	<?php

	Event::listen('orchestra.started: backend', function ()
	{
		// Add a custom menu
		$menu = Orchestra\Core::menu();

		$menu->add('hello', 'after:home')
			->title('Hello World')
			->link(handles('orchestra::pages/oneauth/hello'));
	});

	Event::listen('orchestra.pages: oneauth.hello', function ()
	{
		return 'Hello world';
	});<commit_msg>Update documentation on pages/manages usage<commit_after># Pages for Extension

## Table of Content
- [Introduction](#introduction)
- [Add a Page for Administrators](#manage)
- [Add a Page for Users](#page)

<a name="introduction"></a>
## Introduction

Orchestra wouldn't be useful if you can't create a custom page on Orchestra Administrator Panel. For this purpose, we introduce two event listener to add 
dynamic page for either user and administrator.

<a name="manage"></a>
## Add a Page for Administrators

Use `"orchestra.manages: ..."` event listener to add a custom page only accessible by administrator user account. Here's an example of a custom manage page for oneauth.

	<?php

	Event::listen('orchestra.started: backend', function ()
	{
		// Add a custom menu
		$menu = Orchestra\Core::menu();

		$menu->add('hello', 'after:home')
			->title('Hello World')
			->link(handles('orchestra::manages/oneauth.hello'));
	});

	Event::listen('orchestra.manages: oneauth.hello', function ()
	{
		return 'Hello world';
	});

<a name="page"></a>
## Add a Page for Users

Use `"orchestra.pages: ..."` event listener to add a custom page viewable by all logged user, it work similarly as [Add a Page for Administrator](#manage).

	<?php

	Event::listen('orchestra.started: backend', function ()
	{
		// Add a custom menu
		$menu = Orchestra\Core::menu();

		$menu->add('hello', 'after:home')
			->title('Hello World')
			->link(handles('orchestra::pages/oneauth.hello'));
	});

	Event::listen('orchestra.pages: oneauth.hello', function ()
	{
		return 'Hello world';
	});
{'fraction_non_alphanumeric': 0.1513496143958869, 'fraction_numerical': 0.0, 'mean_word_length': 4.5, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 27, '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': '1426496', 'n_tokens_mistral': 992, 'n_tokens_neox': 919, 'n_words': 318}