# css-javascript-toolbox/6.0.9/access.points/extensions.accesspoint.php

CSS &amp; JavaScript Toolbox, version 6.0.9. 78 lines.

- Page: https://pluginprobe.com/plugins/css-javascript-toolbox/6.0.9/code/access.points/extensions.accesspoint.php
- Raw: https://pluginprobe.com/plugins/css-javascript-toolbox/6.0.9/raw/access.points/extensions.accesspoint.php
- Modified: 2013-03-26T18:12:22+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/css-javascript-toolbox/6.0.9/code/access.points/extensions.accesspoint.php#L10-L20`.

```php
<?php
/**
* 
*/

// Disallow direct access.
defined('ABSPATH') or die("Access denied");

/**
* 
*/
class CJTExtensionsAccessPoint extends CJTAccessPoint {
	
	/**
	* 
	*/
	const MENU_POSITION_INDEX = 1;
	
	/**
	* 
	*/
	const PLUGINS_PAGE_SEARCH_TERM = 'CJT-Extension';
	
	/**
	* put your comment there...
	* 
	*/
	public function __construct() {
		// Initialize Access Point base!
		parent::__construct();
		// Set access point name!
		$this->name = 'extensions';
	}

	/**
	* put your comment there...
	* 
	*/
	protected function doListen() {
		// Only if permitted!
		if ($this->hasAccess()) {
			// Add menu pages.
			add_action('admin_menu', array(&$this, 'menu'), 12);
		}
	}
	
	/**
	* put your comment there...
	* 
	*/
	public function menu() {
		// Extensions page.
		add_submenu_page(CJTPlugin::PLUGIN_REQUEST_ID, null, cssJSToolbox::getText('Extensions'), 'administrator', null);
		// Hack Extensions menu item to point to Plugins page!
		$GLOBALS['submenu'][CJTPlugin::PLUGIN_REQUEST_ID][self::MENU_POSITION_INDEX][2] = admin_url('plugins.php?s=' . self::PLUGINS_PAGE_SEARCH_TERM);
		// When plugins page loaded!
		add_action('load-plugins.php', array($this, 'route'), 10, 0);
	}
	
	/**
	* put your comment there...
	* 
	*/
	public function route($loadView = null, $request = array('view' => 'extensions/plugins-list')) {
		// Set as connected object!
		$this->connected();
		// Load extensions view throughjt the default controller!
		parent::route($loadView, $request)
		// Set Action name!
		->setAction('extensions')
		// Dispatch the call!
		->_doAction();
	}
	
} // End class.

// Hookable!
CJTExtensionsAccessPoint::define('CJTExtensionsAccessPoint', array('hookType' => CJTWordpressEvents::HOOK_FILTER));
```
