Register admin screen
969704
public function admin_menu(){
		$title = __('Google Analytics設定', 'gapiwp');
		$menu  = __('Analytics設定', 'gapiwp');
		add_options_page($title, $menu, 'manage_options', 'gapiwp-analytics', array($this, 'admin_render'));
	}
699564
def register_computer_view(request):
    """"""
    if request.method == "POST":
        form = ComputerRegistrationForm(request.POST)
        logger.debug(form)
        if form.is_valid():
            obj = form.save()
            obj.user = request.user
            obj.save()
            messages.success(request, "Successfully added computer.")
            return redirect("itemreg")
        else:
            messages.error(request, "Error adding computer.")
    else:
        form = ComputerRegistrationForm()
    return render(request, "itemreg/register_form.html", {"form": form, "action": "add", "type": "computer", "form_route": "itemreg_computer"})
1232136
def register_to_sys_with_admin_list(class_inst, admin_list=None, is_normal_admin_needed=False):
    
    if admin_list is None:
        admin_class = get_valid_admin_class_with_list([], class_inst)
    else:
        admin_class = get_valid_admin_class_with_list(admin_list, class_inst)
    if is_normal_admin_needed:
        register_all_type_of_admin(admin_class, class_inst)
    else:
        register_admin(admin_class, class_inst)
920696
protected function _setupAdminProfileNavBar()
    {
        Nav::add('profile', 'profile', [
            'weight' => 10,
            'icon'   => 'user',
            'title'  => __d('community', 'My profile'),
            'url'    => [
                'action'     => 'edit',
                'controller' => 'Users',
                'plugin'     => 'Community',
                $this->_controller->Auth->user('id')
            ]
        ]);

        Nav::add('profile', 'logout', [
            'weight' => 100,
            'icon'   => 'sign-out-alt',
            'title'  => __d('community', 'Logout'),
            'url' => [
                'controller' => 'Users',
                'action'     => 'logout',
                'plugin'     => 'Community'
            ]
        ]);
    }
973669
public static function registerColumnDisplayer()
    {
        $map = [
            'editable' => \Jblv\Admin\Grid\Displayers\Editable::class,
            'switch' => \Jblv\Admin\Grid\Displayers\SwitchDisplay::class,
            'switchGroup' => \Jblv\Admin\Grid\Displayers\SwitchGroup::class,
            'select' => \Jblv\Admin\Grid\Displayers\Select::class,
            'image' => \Jblv\Admin\Grid\Displayers\Image::class,
            'label' => \Jblv\Admin\Grid\Displayers\Label::class,
            'button' => \Jblv\Admin\Grid\Displayers\Button::class,
            'link' => \Jblv\Admin\Grid\Displayers\Link::class,
            'badge' => \Jblv\Admin\Grid\Displayers\Badge::class,
            'progressBar' => \Jblv\Admin\Grid\Displayers\ProgressBar::class,
            'radio' => \Jblv\Admin\Grid\Displayers\Radio::class,
            'checkbox' => \Jblv\Admin\Grid\Displayers\Checkbox::class,
            'orderable' => \Jblv\Admin\Grid\Displayers\Orderable::class,
        ];

        foreach ($map as $abstract => $class) {
            Column::extend($abstract, $class);
        }
    }
824974
def setup(self):
        '''
        
        '''
        if self.controller:
            self.controller.setup()
        for monitor in self.monitors:
            monitor.setup()
1158362
public function register()
    {
        $displayer = new BasicDisplayer;
        $handler = new Handler($displayer);
        $this->container->bind('error', $handler);
    }
262553
protected function registerPermissions()
    {
        $group = PermissionFacade::add(
            'page',
            function (PermissionGroup $group) {
                $group->label('avored-framework::permission.page.title');
            }
        );
        $group->addPermission(
            'admin-page-list',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.page.list')
                    ->routes('admin.page.index');
            }
        );
        $group->addPermission(
            'admin-page-create', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.page.create')
                    ->routes('admin.page.create,admin.page.store');
            }
        );
        $group->addPermission(
            'admin-page-update', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.page.edit')
                    ->routes('admin.page.edit,admin.page.update');
            }
        );
        $group->addPermission(
            'admin-page-destroy', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.page.destroy')
                    ->routes('admin.page.destroy');
            }
        );
        $group->addPermission(
            'admin-page-show', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.page.show')
                    ->routes('admin.page.show');
            }
        );

        $group = PermissionFacade::add(
            'menu', 
            function (PermissionGroup $group) {
                $group->label('avored-framework::permission.menu.title');
            }
        );

        $group->addPermission(
            'admin-menu-list', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.menu.front')
                    ->routes('admin.menu.index');
            }
        );

        $group->addPermission(
            'admin-menu-store', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.menu.save')
                    ->routes('admin.menu.store');
            }
        );

        $group = PermissionFacade::add(
            'category', 
            function (PermissionGroup $group) {
                $group->label('avored-framework::permission.category.title');
            }
        );
        $group->addPermission(
            'admin-category-list', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.category.list')
                    ->routes('admin.category.index');
            }
        );
        $group->addPermission(
            'admin-category-create', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.category.create')
                    ->routes('admin.category.create,admin.category.store');
            }
        );
        $group->addPermission(
            'admin-category-update',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.category.edit')
                    ->routes('admin.category.edit,admin.category.update');
            }
        );
        $group->addPermission(
            'admin-category-destroy',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.category.destroy')
                    ->routes('admin.category.destroy');
            }
        );
        $group->addPermission(
            'admin-category-show',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.category.show')
                    ->routes('admin.category.show');
            }
        );

        $group = PermissionFacade::add(
            'product',
            function (PermissionGroup $group) {
                $group->label('avored-framework::permission.product.title');
            }
        );

        $group->addPermission(
            'admin-product-list',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.product.list')
                    ->routes('admin.product.index');
            }
        );
        $group->addPermission(
            'admin-product-create',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.product.create')
                    ->routes('admin.product.create,admin.product.store');
            }
        );
        $group->addPermission(
            'admin-product-update',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.product.edit')
                    ->routes('admin.product.edit,admin.product.update');
            }
        );
        $group->addPermission(
            'admin-product-destroy',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.product.destroy')
                    ->routes('admin.product.destroy');
            }
        );
        $group->addPermission(
            'admin-product-show',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.product.show')
                    ->routes('admin.product.show');
            }
        );

        $group = PermissionFacade::add(
            'order',
            function (PermissionGroup $group) {
                $group->label('avored-framework::permission.order.title');
            }
        );

        $group->addPermission(
            'admin-order-list',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.order.list')
                    ->routes('admin.order.index');
            }
        );

        $group->addPermission(
            'admin-order-view',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.order.view')
                    ->routes('admin.order.view');
            }
        );
        $group->addPermission(
            'admin-order-send-invoice-email',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.order.sent_invoice_by_mail')
                    ->routes('admin.order.send-email-invoice');
            }
        );
        $group->addPermission(
            'admin-order-change-status', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.order.status_change')
                    ->routes('admin.order.change-status,admin.order.update-status');
            }
        );

        $group = PermissionFacade::add(
            'order-status',
            function (PermissionGroup $group) {
                $group->label('avored-framework::permission.order_status.title');
            }
        );
        $group->addPermission(
            'admin-order-status-list',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.order_status.list')
                    ->routes('admin.order-status.index');
            }
        );
        $group->addPermission(
            'admin-order-status-create',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.order_status.create')
                    ->routes('admin.order-status.create,admin.order-status.store');
            }
        );
        $group->addPermission(
            'admin-order-status-update',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.order_status.edit')
                    ->routes('admin.order-status.edit,admin.order-status.update');
            }
        );
        $group->addPermission(
            'admin-order-status-destroy',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.order_status.destroy')
                    ->routes('admin.order-status.destroy');
            }
        );
        $group->addPermission(
            'admin-order-status-show',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.order_status.show')
                    ->routes('admin.order-status.show');
            }
        );

        $group = PermissionFacade::add(
            'attribute',
            function (PermissionGroup $group) {
                $group->label('avored-framework::permission.attribute.title');
            }
        );
        $group->addPermission(
            'admin-attribute-list',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.attribute.list')
                    ->routes('admin.attribute.index');
            }
        );
        $group->addPermission(
            'admin-attribute-create',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.attribute.create')
                    ->routes('admin.attribute.create,admin.attribute.store');
            }
        );
        $group->addPermission(
            'admin-attribute-update',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.attribute.edit')
                    ->routes('admin.attribute.edit,admin.attribute.update');
            }
        );
        $group->addPermission(
            'admin-attribute-destroy',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.attribute.destroy')
                    ->routes('admin.attribute.destroy');
            }
        );
        $group->addPermission(
            'admin-attribute-show',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.attribute.show')
                    ->routes('admin.attribute.show');
            }
        );

        $group = PermissionFacade::add(
            'property',
            function (PermissionGroup $group) {
                $group->label('avored-framework::permission.property.title');
            }
        );

        $group->addPermission(
            'admin-property-list',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.property.list')
                    ->routes('admin.property.index');
            }
        );
        $group->addPermission(
            'admin-property-create',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.property.create')
                    ->routes('admin.property.create,admin.property.store');
            }
        );
        $group->addPermission(
            'admin-attribute-update',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.property.edit')
                    ->routes('admin.property.edit,admin.property.update');
            }
        );
        $group->addPermission(
            'admin-property-destroy',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.property.destroy')
                    ->routes('admin.property.destroy');
            }
        );
        $group->addPermission(
            'admin-property-show',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.property.show')
                    ->routes('admin.property.show');
            }
        );

        $group = PermissionFacade::add(
            'user',
            function (PermissionGroup $group) {
                $group->label('avored-framework::permission.user.title');
            }
        );

        $group->addPermission(
            'admin-user-list',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.user.list')
                    ->routes('admin.user.index');
            }
        );
        $group->addPermission(
            'admin-user-create',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.user.create')
                    ->routes('admin.user.create,admin.user.store');
            }
        );
        $group->addPermission(
            'admin-user-update',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.user.edit')
                    ->routes('admin.user.edit,admin.user.update');
            }
        );
        $group->addPermission(
            'admin-user-destroy',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.user.destroy')
                    ->routes('admin.user.destroy');
            }
        );
        $group->addPermission(
            'admin-user-show', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.user.show')
                    ->routes('admin.user.show');
            }
        );

        $group = PermissionFacade::add(
            'user-group',
            function (PermissionGroup $group) {
                $group->label('avored-framework::permission.user_group.title');
            }
        );

        $group->addPermission(
            'admin-user-group-list',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.user_group.list')
                    ->routes('admin.user-group.index');
            }
        );
        $group->addPermission(
            'admin-user-group-create',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.user_group.create')
                    ->routes('admin.user-group.create,admin.user-group.store');
            }
        );
        $group->addPermission(
            'admin-user-group.update',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.user_group.edit')
                    ->routes('admin.user-group.edit,admin.user-group.update');
            }
        );
        $group->addPermission(
            'admin-user-group-destroy',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.user_group.destroy')
                    ->routes('admin.user-group.destroy');
            }
        );
        $group->addPermission(
            'admin-user-group-show',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.user_group.show')
                    ->routes('admin.user-group.show');
            }
        );

        $group = PermissionFacade::add(
            'admin-user',
            function (PermissionGroup $group) {
                $group->label('avored-framework::permission.admin_user.title');
            }
        );

        $group->addPermission(
            'admin-admin-user-list',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.admin_user.list')
                    ->routes('admin.admin-user.index');
            }
        );
        $group->addPermission(
            'admin-admin-user-create',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.admin_user.create')
                    ->routes('admin.admin-user.create,admin.admin-user.store');
            }
        );
        $group->addPermission(
            'admin-admin-user-update',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.admin_user.edit')
                    ->routes('admin.admin-user.edit,admin.admin-user.update');
            }
        );
        $group->addPermission(
            'admin-admin-user-destroy',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.admin_user.destroy')
                    ->routes('admin.admin-user.destroy');
            }
        );
        $group->addPermission(
            'admin-admin-user-show',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.admin_user.show')
                    ->routes('admin.admin-user.show');
            }      
        );

        $group = PermissionFacade::add(
            'role',
            function (PermissionGroup $group) {
                $group->label('avored-framework::permission.role.title');
            }
        );

        $group->addPermission(
            'admin-role-list',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.role.list')
                    ->routes('admin.role.index');
            }
        );
        $group->addPermission(
            'admin-role-create',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.role.create')
                    ->routes('admin.role.create,admin.role.store');
            }           
        );
        $group->addPermission(
            'admin-role-update',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.role.edit')
                    ->routes('admin.role.edit,admin.role.update');
            }
        );
        $group->addPermission(
            'admin-role-destroy',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.role.destroy')
                    ->routes('admin.role.destroy');
            }
        );
        $group->addPermission(
            'admin-role-show',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.role.show')
                    ->routes('admin.role.show');
            }
        );

        $group = PermissionFacade::add(
            'configuration',
            function (PermissionGroup $group) {
                $group->label('avored-framework::permission.configuration.title');
            }
        );

        $group->addPermission(
            'admin-configuration',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.configuration.view')
                    ->routes('admin.configuration');
            }
        );
        $group->addPermission(
            'admin-configuration-store',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.configuration.edit')
                    ->routes('admin.configuration.store');
            }    
        );

        $group = PermissionFacade::add(
            'site-currency',
            function (PermissionGroup $group) {
                $group->label('Site Currency Permissions');
            }
        );

        $group->addPermission(
            'admin-site-currency-list',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.site_currency.title')
                    ->routes('admin.site-currency.index');
            }
        );
        $group->addPermission(
            'admin-site-currency-create', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.site_currency.create')
                    ->routes('admin.site-currency.create,admin.site-currency.store');
            }
        );
        $group->addPermission(
            'admin-site-currency-update', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.site_currency.edit')
                    ->routes('admin.site-currency.edit,admin.site-currency.update');
            }
        );
        $group->addPermission(
            'admin-site-currency-destroy',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.site_currency.destroy')
                    ->routes('admin.site-currency.destroy');
            }
        );
        $group->addPermission(
            'admin-site-currency-show', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.site_currency.show')
                    ->routes('admin.site-currency.show');
            }
        );

        $group = PermissionFacade::add(
            'country', 
            function (PermissionGroup $group) {
                $group->label('avored-framework::permission.country.title');
            }
        );

        $group->addPermission(
            'admin-country-list',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.country.list')
                    ->routes('admin.country.index');
            }
        );
        $group->addPermission(
            'admin-country-create',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.country.create')
                    ->routes('admin.country.create,admin.country.store');
            }
        );
        $group->addPermission(
            'admin-country-update',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.country.edit')
                    ->routes('admin.country.edit,admin.country.update');
            }
        );
        $group->addPermission(
            'admin-country-destroy',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.country.destroy')
                    ->routes('admin.country.destroy');
            }
        );
        $group->addPermission(
            'admin-country-show',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.country.show')
                    ->routes('admin.country.show');
            }
        );
        $group = PermissionFacade::add(
            'language', 
            function (PermissionGroup $group) {
                $group->label('avored-framework::permission.language.title');
            }
        );

        $group->addPermission(
            'admin-language-list',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.language.list')
                    ->routes('admin.language.index');
            }
        );
        $group->addPermission(
            'admin-language-create',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.language.create')
                    ->routes('admin.language.create,admin.language.store');
            }
        );
        $group->addPermission(
            'admin-language-update',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.language.edit')
                    ->routes('admin.language.edit,admin.language.update');
            }
        );
        $group->addPermission(
            'admin-language-destroy',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.language.destroy')
                    ->routes('admin.language.destroy');
            }
        );
        $group->addPermission(
            'admin-language-show',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.language.show')
                    ->routes('admin.language.show');
            }
        );

        $group = PermissionFacade::add(
            'state', 
            function (PermissionGroup $group) {
                $group->label('avored-framework::permission.state.title');
            }
        );

        $group->addPermission(
            'admin-state-list', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.state.list')
                    ->routes('admin.state.index');
            }
        );
        $group->addPermission(
            'admin-state-create', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.state.create')
                    ->routes('admin.state.create,admin.state.store');
            }
        );
        $group->addPermission(
            'admin-state-update', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.state.edit')
                    ->routes('admin.state.edit,admin.state.update');
            }
        );
        $group->addPermission(
            'admin-site-currency-destroy', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.state.destroy')
                    ->routes('admin.state.destroy');
            }
        );
        $group->addPermission(
            'admin-site-currency-show',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.state.show')
                    ->routes('admin.state.show');
            }
        );

        $group = PermissionFacade::add(
            'theme', 
            function (PermissionGroup $group) {
                $group->label('avored-framework::permission.theme.title');
            }
        );

        $group->addPermission(
            'admin-theme-list',
            function (Permission $permission) {
                $permission->label('avored-framework::permission.theme.list')
                    ->routes('admin.theme.index');
            }
        );
        $group->addPermission(
            'admin-theme-create', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.theme.create')
                    ->routes('admin.create.index', 'admin.theme.store');
            }
        );
        $group->addPermission(
            'admin-theme-activated', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.theme.activated')
                    ->routes('admin.activated.index');
            }
        );
        $group->addPermission(
            'admin-theme-deactivated', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.theme.deactivated')
                    ->routes('admin.deactivated.index');
            }
        );

        $group = PermissionFacade::add(
            'module', 
            function (PermissionGroup $group) {
                $group->label('avored-framework::permission.module.title');
            }
        );

        $group->addPermission(
            'admin-module-list', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.module.list')
                    ->routes('admin.module.index');
            }
        );
        $group->addPermission(
            'admin-module-create', 
            function (Permission $permission) {
                $permission->label('avored-framework::permission.module.upload')
                    ->routes('admin.create.index', 'admin.module.store');
            }
        );

        Blade::if(
            'hasPermission', 
            function ($routeName) {
                $condition = false;
                $user = Auth::guard('admin')->user();
                if (!$user) {
                    $condition = $user->hasPermission($routeName) ?: false;
                }
                $converted_res = ($condition) ? 'true' : 'false';
                return "<?php if ($converted_res): ?>";
            }
        );
    }
413818
private function setup_pages() {

		$args                 = array(
			'capability' => 'manage_options',
			'icon'       => null,
			'position'   => null,
		);
		$this->struct['args'] = array_merge( $args, $this->struct );

		if ( ! isset( $this->struct['parent'] ) ) {
			add_action( 'admin_menu', array( $this, 'add_settings_page' ), 9 );
		} else {
			add_action( 'admin_menu', array( $this, 'add_sub_page' ), 9 );
		}

	}
70131
protected function registerSidebars()
    {
        do_action("before_theme_register_sidebars");

        foreach ($this->getConfig("sidebars") as $id => $sidebar):
            add_action("widgets_init", function () use ($id, $sidebar) {
                register_sidebar(array(
                    'name' => __($sidebar["name"], 'sections'),
                    'id' => $id,
                    'description' => __($sidebar["description"], 'sections'),
                    'before_widget' => $sidebar["before_widget"],
                    'after_widget' => $sidebar["after_widget"],
                    'before_title' => $sidebar["before_title"],
                    'after_title' => $sidebar["after_title"]
                ));
            });
        endforeach;

        do_action("after_theme_register_sidebars");
    }
260718
def register_admin(app, admin):
    """"""
    category = 'Knowledge'
    admin.category_icon_classes[category] = "fa fa-mortar-board"
    admin.add_view(
        KnowledgeAdmin(app, KnwKB, db.session,
                       name='Knowledge Base', category=category,
                       endpoint="kb")
    )
    admin.add_view(
        KnwKBRVALAdmin(app, KnwKBRVAL, db.session,
                       name="Knowledge Mappings", category=category,
                       endpoint="kbrval")
    )
64990
def register_view(self, view):
        """"""
        super(ToolBarController, self).register_view(view)
        self.view['button_new'].connect('clicked', self.on_button_new_clicked)
        self.view['button_open'].connect('clicked', self.on_button_open_clicked)
        self.view['button_save'].connect('clicked', self.on_button_save_clicked)
        self.view['button_refresh'].connect('clicked', self.on_button_refresh_clicked)
        self.view['button_refresh_selected'].connect('clicked', self.on_button_refresh_selected_clicked)
        self.view['button_refresh_libs'].connect('clicked', self.on_button_refresh_libs_clicked)
        self.view['button_bake_state_machine'].connect('clicked', self.on_button_bake_state_machine_clicked)
453641
protected function registerAdminConfiguration()
    {
        $configurationGroup = AdminConfigurationFacade::add('general')
            ->label('avored-framework::system.configuration.general_title');

        $configurationGroup->addConfiguration('general_site_title')
            ->label('avored-framework::system.configuration.default_site_title')
            ->type('text')
            ->name('general_site_title');

        $configurationGroup->addConfiguration('general_site_description')
            ->label('avored-framework::system.configuration.default_site_description')
            ->type('text')
            ->name('general_site_description');

        $siteCurrencyRepository = new SiteCurrencyRepository;
        $configurationGroup->addConfiguration('general_site_currency')
            ->label('avored-framework::system.configuration.default_site_currency')
            ->type('select')
            ->name('general_site_currency')
            ->options($siteCurrencyRepository);

        $configurationGroup->addConfiguration('general_administrator_email')
            ->label('avored-framework::system.configuration.administrator_email')
            ->type('text')
            ->name('general_administrator_email');

        $configurationGroup->addConfiguration('general_term_condition_page')
            ->label('avored-framework::system.configuration.term_condition_page')
            ->type('select')
            ->name('general_term_condition_page')
            ->options(
                function () {
                    $options = Page::all()->pluck('name', 'id');
                    return $options;
                }
            );

        $configurationGroup->addConfiguration('general_home_page')
            ->label('avored-framework::system.configuration.home_page')
            ->type('select')
            ->name('general_home_page')
            ->options(
                function () {
                    return Page::all()->pluck('name', 'id');
                }
            );

        $userGroup = AdminConfigurationFacade::add('users')
            ->label('avored-framework::system.configuration.user_title');

        $userGroup->addConfiguration('user_default_country')
            ->label('avored-framework::system.configuration.user_default_country')
            ->type('select')
            ->name('user_default_country')
            ->options(
                function () {
                    return Country::all()->pluck('name', 'id');
                }
            );

        $userGroup->addConfiguration('user_activation_required')
            ->label('avored-framework::system.configuration.user_activation_required')
            ->type('select')
            ->name('user_activation_required')
            ->options(
                function () {
                    return [0 => 'No', 1 => 'Yes'];
                }
            );

        $userGroup->addConfiguration('user_delete_request_days')
            ->label('avored-framework::system.configuration.user_delete_request_days')
            ->type('text')
            ->name('user_delete_request_days');

        $shippingGroup = AdminConfigurationFacade::add('shipping')
            ->label('avored-framework::system.configuration.shipping_title');

        $shippingGroup->addConfiguration('shipping_free_shipping_enabled')
            ->label('avored-framework::system.configuration.is_free_shipping_enabled')
            ->type('select')
            ->name('shipping_free_shipping_enabled')
            ->options(
                function () {
                    return [1 => 'Yes', 0 => 'No'];
                }
            );

        $paymentGroup = AdminConfigurationFacade::add('payment')
            ->label('avored-framework::system.configuration.payment_title');

        $paymentGroup->addConfiguration('payment_stripe_enabled')
            ->label('avored-framework::system.configuration.payment_stripe_enabled')
            ->type('select')
            ->name('payment_stripe_enabled')
            ->options(
                function () {
                    return [0 => 'No', 1 => 'Yes'];
                }
            );

        $paymentGroup->addConfiguration('payment_stripe_publishable_key')
            ->label('avored-framework::system.configuration.payment_stripe_publishable_key')
            ->type('text')
            ->name('payment_stripe_publishable_key');

        $paymentGroup->addConfiguration('avored_stripe_secret_key')
            ->label('avored-framework::system.configuration.payment_stripe_secret_key')
            ->type('text')
            ->name('avored_stripe_secret_key');

        $taxGroup = AdminConfigurationFacade::add('tax')
            ->label('avored-framework::system.configuration.tax_title');

        $taxGroup->addConfiguration('tax_enabled')
            ->label('avored-framework::system.configuration.is_tax_enabled')
            ->type('select')
            ->name('tax_enabled')
            ->options(
                function () {
                    return [1 => 'Yes', 0 => 'No'];
                }
            );

        $taxGroup->addConfiguration('tax_percentage')
            ->label('avored-framework::system.configuration.tax_percentage')
            ->type('text')
            ->name('tax_percentage');

        $taxGroup->addConfiguration('tax_default_country')
            ->label('avored-framework::system.configuration.tax_default_country')
            ->type('select')
            ->name('tax_default_country')
            ->options(
                function () {
                    return $options = Country::all()->pluck('name', 'id');
                }
            );
    }
1137037
protected function registerWidgets()
    {
        $default_widgets = ['LaravelAdminPanel\\Widgets\\UserDimmer', 'LaravelAdminPanel\\Widgets\\PostDimmer', 'LaravelAdminPanel\\Widgets\\PageDimmer'];
        $widgets = config('admin.dashboard.widgets', $default_widgets);

        foreach ($widgets as $widget) {
            Widget::group('admin::dimmers')->addWidget($widget);
        }
    }
718188
@Override
    public void register(CareWebShell shell, ElementBase owner, boolean register) {
        if (register) {
            ElementPlugin plugin = (ElementPlugin) owner;
            Button button = new Button(getCaption());
            button.setName(getId());
            button.setHint(getHint());
            button.setImage(getIcon());
            ActionUtil.addAction(button, getAction());
            plugin.addToolbarComponent(button);
            plugin.registerId(getId(), button);
        }
    }
868362
public function addadminmenu(){
		$rules=array(
			(object)array(
				'com' => 'admin',
				'position' => 'adminmenu',
				'segments' => array('view'=>'adminmenu')
				),
			(object)array(
				'com' => 'admin',
				'position' => 'userpanel',
				'segments' => array('view'=>'userpanel','uid')
				),
				);
		$this->rules=array_merge($this->rules,$rules);
		}
51092
private function registerModuleRegistry()
    {
        $this->app->singleton( 'arbory', function ()
        {
            return new Admin(
                $this->app['sentinel'],
                new Menu(),
                new AssetPipeline()
            );
        } );

        $this->app->singleton( Admin::class, function ()
        {
            return $this->app['arbory'];
        } );
    }