Route page callback to display the module settings page
491923
public function editSettings()
    {
        $this->setTitleEditSettings();
        $this->setBreadcrumbEditSettings();

        $this->setData('file_dir', gplcart_path_normalize(GC_DIR_FILE));
        $this->setData('settings', $this->module->getSettings('file_manager'));

        $this->submitSettings();
        $this->setDataAccessSettings();
        $this->setDataMultilineTextSettings('filesize_limit');
        $this->setDataMultilineTextSettings('extension_limit');

        $this->outputEditSettings();
    }
251358
function generateRouter(path, modelName, generateMethod, ts, cb) {
    var extension = (ts) ? 'ts' : 'js';
    var router = ft.loadTemplateSync('router.' + extension);
    router = router.replace(/{controllerName}/g, modelName + 'Controller');

    if (generateMethod === 't') {
        ft.createDirIfIsNotDefined(path, 'routes', function () {
            router = router.replace(/{controllerPath}/g, '\'../controllers/' + modelName + 'Controller.' + extension + '\'');
            ft.writeFile(path + '/routes/' + modelName + 'Routes.' + extension, router, null, cb);
        });
    } else {
        ft.createDirIfIsNotDefined(path, modelName, function () {
            router = router.replace(/{controllerPath}/g, '\'./' + modelName + 'Controller.' + extension + '\'');
            ft.writeFile(path + '/' + modelName + '/' + modelName + 'Routes.' + extension, router, null, cb);
        });
    }
}
1078645
public function renderPagetabPropertiesAction()
	{
		$idPage = $this->params()->fromRoute('idPage', $this->params()->fromQuery('idPage', ''));
		$melisKey = $this->params()->fromRoute('melisKey', '');
		$pageStyle = null;
		$pathAppConfigForm = self::PagePropertiesAppConfigPath;
		 
		/**
		 * Get the config for this form
		 */
		$melisMelisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
		$pageStyleTable = $this->getServiceLocator()->get('MelisEngineTablePageStyle');
		
		$appConfigForm = $melisMelisCoreConfig->getFormMergedAndOrdered(
		    self::PagePropertiesAppConfigPath,
		    'meliscms_page_properties',
		    $idPage . '_'
		);

		/** Overriding the Page properties form by calling listener */
        $modifiedForm =  $this->getEventManager()->trigger(
            'modify_page_properties_form_config',
            $this,
            ['appConfigForm' => $appConfigForm]
        )->last();
        if (!empty($modifiedForm)) {
            $appConfigForm = $modifiedForm;
        }

		if (!empty($idPage))
		{
			// Lang not changeable after creation, config array defines the form in "new" state
			$appConfigForm = $melisMelisCoreConfig->setFormFieldDisabled($appConfigForm, 'plang_lang_id', true);
			$appConfigForm = $melisMelisCoreConfig->setFormFieldRequired($appConfigForm, 'plang_lang_id', false);
		}
		 
		/**
		 * Get the data to fill the form
		 */
		if (!empty($idPage))
		{
			$melisPage = $this->serviceLocator->get('MelisEnginePage');
			$datasPage = $melisPage->getDatasPage($idPage, 'saved');
			$datasPageTree = $datasPage->getMelisPageTree();
			$pageStyle = $pageStyleTable->getEntryByField('pstyle_page_id', $idPage)->current();
		}
		else
			$datasPageTree = null;
		 
		/**
		 * Generate the form through factory and change ElementManager to
		 * have access to our custom Melis Elements
		 * Bind with datas
		 */
		$factory = new \Zend\Form\Factory();
		$formElements = $this->serviceLocator->get('FormElementManager');
		$factory->setFormElementManager($formElements);
		$appConfigForm['attributes']['action'] .= '?idPage=' . $idPage;
		$propertyForm = $factory->createForm($appConfigForm);
		
		// service for handling Melis Multi Value Input (tags)
		if (!empty($datasPageTree)) {
		    // modify the values of the dates to render to its locale
		    $container = new Container('meliscore');
		    $locale = $container['melis-lang-locale'];
		    $melisTranslation = $this->getServiceLocator()->get('MelisCoreTranslation');
		    
		    $datasPageTree->page_creation_date = strftime($melisTranslation->getDateFormatByLocate($locale), strtotime($datasPageTree->page_creation_date));
		    $datasPageTree->page_edit_date = strftime($melisTranslation->getDateFormatByLocate($locale), strtotime($datasPageTree->page_edit_date));
            $propertyForm->bind($datasPageTree);
		}
		
		if(!empty($pageStyle)){
		    $propertyForm->setData(array('style_id' => $pageStyle->pstyle_style_id));
		}
		
		/**
		 * Send back the view and add the form config inside
		*/
		$view = new ViewModel();
		$view->setVariable('meliscms_page_properties', $propertyForm);
		$view->idPage = $idPage;
		$view->melisKey = $melisKey;
	
		return $view;
	}
840279
public function settings_page() {
		?>
		<div class="wrap">
			<h2><?php echo esc_html( self::get_page_title() ); ?></h2>
		</div>

		<form method="POST" action="options.php">
			<?php
			settings_fields( self::get_page_name() );
			do_settings_sections( self::get_page_name() );
			submit_button();
			?>
		</form>
		<?php
	}
162796
function _processRoute(siteDesc, prefix, options) {
    options = options || {};
    //if (siteDesc.roles !== undefined && siteDesc.url !== undefined)
    //console.log('route', siteDesc.url, 'prefix', prefix);

    if (userHelper.hasRole(siteDesc.roles)) {
        let route = {
            roles: siteDesc.roles,
            name: prefix,
            route: siteDesc.url,
            regex: routeToRegExp(siteDesc.url),
            requiredParams: siteDesc.requiredParams
        };
        //Call the Backbone.history.handlers....
        //console.log('*****************');
        //console.log('ROute name: ',route.route);
        //console.log('Route handler name : ',  findRouteName(route.route.substring(1)));
        routes[findRouteName(route.route.substring(1))] = route;
        if (options.isInSiteStructure) {
            siteStructure[prefix] = route;
        }
    }
}
761424
def update_context(app, pagename, templatename, context, doctree):  # pylint: disable=unused-argument
    
    context['feedback_form_url'] = feedback_form_url(app.config.project, pagename)
736531
public function add_settings_page() {

		$this->screen_hook_suffix = add_menu_page(
			$this->struct['args']['page_title'],
			$this->struct['args']['menu_title'],
			$this->struct['args']['capability'],
			$this->slug,
			array( $this, 'create_page' ),
			$this->struct['args']['icon'],
			$this->struct['args']['position']
		);

	}
103098
function (params) {

			if (dir.config.userConfig && 
				dir.config.userConfig.openRoute) {
				// Invoke user-defined open route callback.
				var async = new Async(routeOpenDone);
				var outputParams = dir.config.userConfig.openRoute(req, res, params, async) || params;

				if (!async.started()) {
					// No async operation was started.
					// Invoke callback directly to complete route opening.
					routeOpenDone(outputParams);
				}
			}
			else {
				// No callback, just complete route opening.
				routeOpenDone(params);
			}
		}
607857
protected function updateSettings()
    {
        $this->controlAccess('module_edit');
        $this->controlAccess('module_xss_edit');

        $this->module->setSettings('xss', $this->getSubmitted());
        $this->redirect('', $this->text('Settings have been updated'), 'success');
    }
576706
def pages_menu(context, page, url='/'):
    
    lang = context.get('lang', pages_settings.PAGE_DEFAULT_LANGUAGE)
    page = get_page_from_string_or_id(page, lang)
    if page:
        children = page.get_children_for_frontend()
        context.update({'children': children, 'page': page})
    return context
1334071
function(page) {
      var t = this,
          newPages = t.pages.slice(0);
      newPages.push(page);
      t.tour.set('pages', newPages);
      t.tour.isDirty = true;
      t.setDirty(true);
      t.loadForm();
    }
120212
public function moduleUpdate(SettingModuleRequest $request, Module $module)
    {
        $this->model::moduleUpdate($module, $request->all());
        
        $route = \Route::has('admin.'.$module->name.'.index') ? 'admin.'.$module->name.'.index' : 'dashboard';
        
        return $this->makeRedirect(true, $route, __('msg_update'));
    }
1238895
function(route, name, callback) 
	{
		var regExp = conbo.isRegExp(route) ? route : this.__routeToRegExp(route);
		
		if (!callback) 
		{
			callback = this[name];
		}
		
		if (conbo.isFunction(name)) 
		{
			callback = name;
			name = '';
		}
		
		if (!callback) 
		{
			callback = this[name];
		}
		
		this.__history.addRoute(regExp, (function(path)
		{
			var args = this.__extractParameters(regExp, path);
			
			var params = conbo.isString(route) 
				? conbo.object((route.match(/:\w+/g) || []).map(function(r) { return r.substr(1); }), args) 
				: {}
				;
			
			callback && callback.apply(this, args);
			
			var options = 
			{
				router:		this,
				route:		regExp,
				name:		name,
				parameters:	args,
				params:		params,
				path:		path
			};
			
			this.dispatchEvent(new conbo.ConboEvent('route:'+name, options));
			this.dispatchEvent(new conbo.ConboEvent(conbo.ConboEvent.ROUTE, options));
			
		}).bind(this));
		
		return this;
	}
138658
function MODULENAME_DivHTML( divId, resourceURL, paramObj ) {
	log( "MODULENAME",  "divId="+divId+" resourceURL="+resourceURL );
	if ( moduleConfig[ divId ] != null ) {
		MODULENAME_RenderHTML( divId, resourceURL, paramObj, moduleConfig[ divId ]  );
	} else {

		//TODO: move that to portal-ng.js
		var metaURL =  resourceURL+"/MODULENAME";
    if ( paramObj != null ) {
      if ( paramObj.def != null ) {
        metaURL = resourceURL+"/"+paramObj.def;
      }
		}
		// pass get params of page to module config loader call, to enable dynamic table columns
		if ( paramObj.get != null ) {
			var first = true;
			for (var key in paramObj.get) {
				metaURL += (first ? "?" :"&");
				metaURL += key + "=" + paramObj.get[ key ];
				first = false;
			}
		}

		$.getJSON( 
			resourceURL+"/MODULENAME", 
			function( pmd ) {
				MODULENAME_RenderHTML( divId, resourceURL, paramObj, pmd );
			}
		);					
	}	
}
54130
def show_page_path_params(page, optional_params = {})
      raise ArgumentError, 'Page is nil' if page.nil?
      url_params = {urlname: page.urlname}.update(optional_params)
      prefix_locale? ? url_params.update(locale: page.language_code) : url_params
    end
4138
private static function routeAction()
    {
        $actionQueryString = Request::getInputValue("do", false, true);
        $actionQuery = Actions::parseActionQueryString($actionQueryString);
        
        Addons::executeComponentFunction($actionQuery->name, $actionQuery->method, @$actionQuery->arguments);
    }
1154683
def module_config(self, settings_module):
        
        assert hasattr(settings_module, '__file__'), 'settings must be a module'
        # set root_path according to module file
        self.set_root_path(settings_module=settings_module)
        app_log.debug('Set root_path: %s', self.root_path)

        global settings

        self.update_settings(dict(
            [(i, getattr(settings_module, i)) for i in dir(settings_module)
             if not i.startswith('_') and i == i.upper()]))

        settings._module = settings_module

        # keep a mapping to app on settings object
        settings._app = self