<commit_before><?php
/**
 * Api_Admin should be used for building your own application's administration
 * model. The benefit is that you'll have access to a number of add-ons which
 * are specifically written for admin system.
 *
 * Exporting add-ons, database migration, test-suites and other add-ons
 * have developed User Interface which can be simply "attached" to your
 * application's admin.
 *
 * This is done through hooks in the Admin Class. It's also important that
 * Api_Admin relies on layout_fluid which makes it easier for add-ons to
 * add menu items, sidebars and foot-bars.
 */
class Api_Admin extends ApiFrontend {

    public $menu;

    function init() {
        parent::init();


        $this->add('Layout_Fluid');

        $this->menu = $this->layout->addMenu();
        $this->layout->addFooter();

        $this->initAddons();
    }

    function initAddons() {
        // TODO: Initialize add-ons automatically which have standard
        // controllers out there
        foreach($this->api->getConfig('addons/active',array()) as $addon) {
            $this->add($addon.'/Controller');
        }
    }
}<commit_msg>Add police and toolbar at the top API level.<commit_after><?php
/**
 * Api_Admin should be used for building your own application's administration
 * model. The benefit is that you'll have access to a number of add-ons which
 * are specifically written for admin system.
 *
 * Exporting add-ons, database migration, test-suites and other add-ons
 * have developed User Interface which can be simply "attached" to your
 * application's admin.
 *
 * This is done through hooks in the Admin Class. It's also important that
 * Api_Admin relies on layout_fluid which makes it easier for add-ons to
 * add menu items, sidebars and foot-bars.
 */
class Api_Admin extends ApiFrontend {

    public $menu;

    function init() {
        parent::init();


        $this->add('Layout_Fluid');

        $this->menu = $this->layout->addMenu();
        $this->layout->addFooter();

        $this->add('jUI');

        $this->police = $this->add('Controller_Police');
        $this->layout->add('sandbox/View_Toolbar',null,'Toolbar');
            

        $this->initAddons();
    }

    function initAddons() {
        // TODO: Initialize add-ons automatically which have standard
        // controllers out there
        foreach($this->api->getConfig('addons/active',array()) as $addon) {
            $this->add($addon.'/Controller');
        }
    }
}
{'fraction_non_alphanumeric': 0.11679420056383408, 'fraction_numerical': 0.0, 'mean_word_length': 2.8934169278996866, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 28, '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': '1409466', 'n_tokens_mistral': 699, 'n_tokens_neox': 671, 'n_words': 236}