Returns the configuration for a certain page

@param string $page The admin page the user is on.

@return array
425563
private function get_config( $page ) {
		// Defaults.
		$config = array(
			'instructions' => $this->get_instructions(),
			'icon'         => 'question',
			'color'        => '#A4286A',
			'poweredBy'    => false,
			'translation'  => $this->get_translations(),
			'showSubject'  => true,
			'zIndex'       => 1000001,
		);

		foreach ( $this->settings as $setting ) {
			if ( method_exists( $setting, 'get_config' ) ) {
				$config = array_merge( $config, $setting->get_config( $page ) );
			}
		}

		return $config;
	}
21028
public function getPagedResults($limit = 50, $page = 0)
    {
        $dql = sprintf(self::DQL_GET_VCSS, VersionControlProvider::class);

        return $this->getPaginator($dql, $limit, $page);
    }
63862
static function FindPageGroup(Page $page)
    {
        $currPage = $page;
        $result = null;
        do 
        {
            $result = $currPage->GetUserGroup();
            $currPage = $currPage->GetParent();
        } 
        while (!$result && $currPage);
        if (!$result && $page->GetSite())
        {
            return $page->GetSite()->GetUserGroup();
        }
        return $result;
    }
1222909
public function getAll($page = null)
    {
        $page = !empty($page) ? "page={$page}" : '';
        $request = $this->paystackHttpClient->get(
            $this->transformUrl(Resource::CUSTOMERS_URL, '').$page
        );

        return $this->processResourceRequestResponse($request);
    }
616299
public function getAll($per_page = 200, $page = 1)
    {
        $domains = $this->adapter->get(sprintf('%s/domains?per_page=%d&page=%d', $this->endpoint, $per_page, $page));

        $domains = json_decode($domains);

        $this->extractMeta($domains);

        return array_map(function ($domain) {
            return new DomainEntity($domain);
        }, $domains->domains);
    }
877971
protected function getPage($page)
    {
        // Handle passed cID
        if (is_numeric($page)) {
            return Page::getByID($page);
        }

        // Handle passed /path/to/collection
        if (is_string($page)) {
            return Page::getByPath($page);
        }

        // If it's a page, just return the page
        if ($page instanceof Page) {
            return $page;
        }

        // If it's not a page but it's a collection, lets try getting a page by id
        if ($page instanceof Collection) {
            return $this->getPage($page->getCollectionID());
        }
    }
118988
public function getPermissionsByPage($page, $sid)
    {
        $objectIdentity = $this->getClassScopeObjectIdentity($page);

        try{

            $ace = $this->getObjectAce($objectIdentity, $sid);
        }
        catch (\Exception $e){

            if (null !== $page->getParent()) {

                return $this->getPermissionsByPage($page->getParent(), $sid);
            }
            elseif ($page->isRoot()){

                try{
                    $ace = $this->getClassAce($this->getClassScopeObjectIdentity(ClassUtils::getRealClass($page)), $sid);
                }
                catch (\Exception $e){
                    return [];
                }
            }
            else{
                return [];
            }
        }

        return $this->getAccessGranted($ace);
    }
1295041
public function get($page = 1)
    {
        $index = $page - 1;

        if (!isset($this->pages[$index])) {
            throw new RuntimeException(sprintf('Invalid page %s of %s', $page, $this->count()));
        }

        return $this->pages[$index];
    }
1179970
protected function getIssues($page)
	{
		$this->out(sprintf('Getting issues page #%02d.', $page));
		$this->out(str_pad('', 40, '-'));

		$issues = $this->api->issues
			->getListByRepository('joomla', 'joomla-framework', null, 'closed', null, null, null, 'updated', 'desc', null, $page, 100);

		$this->out(sprintf('Got %s issues.', count($issues)));

		return $issues;
	}
1303303
public function get_config_for_javascript(moodle_page $page, renderer_base $renderer) {
        global $CFG;

        if (empty($this->M_cfg)) {

            $iconsystem = \core\output\icon_system::instance();

            // It is possible that the $page->context is null, so we can't use $page->context->id.
            $contextid = null;
            if (!is_null($page->context)) {
                $contextid = $page->context->id;
            }

            $this->M_cfg = array(
                'wwwroot'             => $CFG->wwwroot,
                'sesskey'             => sesskey(),
                'themerev'            => theme_get_revision(),
                'slasharguments'      => (int)(!empty($CFG->slasharguments)),
                'theme'               => $page->theme->name,
                'iconsystemmodule'    => $iconsystem->get_amd_name(),
                'jsrev'               => $this->get_jsrev(),
                'admin'               => $CFG->admin,
                'svgicons'            => $page->theme->use_svg_icons(),
                'usertimezone'        => usertimezone(),
                'contextid'           => $contextid,
            );
            if ($CFG->debugdeveloper) {
                $this->M_cfg['developerdebug'] = true;
            }
            if (defined('BEHAT_SITE_RUNNING')) {
                $this->M_cfg['behatsiterunning'] = true;
            }

        }
        return $this->M_cfg;
    }
587195
public function getConfiguration(Request $request)
    {
        $this->request = $request;

        return [
            'headers' => $request->getHeaders()->all(),
            'query'   => $request->getParameters()->all(),
        ];
    }
616351
private function parseConfiguration($configuration)
    {
        $return = [];
        foreach ($configuration as $page) {
            foreach ($page as $key => $setting) {
                if ($key == 'helpers') {
                    foreach ($setting as $a => $b) {
                        if (!isset($return['renderers'])) {
                            $return['renderers'] = array();
                        }
                        if (!isset($return['renderers'][$a])) {
                            $return['renderers'][$a] = array();
                        }
                        if (!isset($return['renderers'][$a]['helpers'])) {
                            $return['renderers'][$a]['helpers'] = array();
                        }
                        $return['renderers'][$a]['helpers'] = array_replace($return['renderers'][$a]['helpers'], $b);
                    }
                } else {
                    $return[$key] = $setting;
                }
            }
        }
        return $return;
    }
1346372
public function getPagePartContexts(HasPagePartsInterface $page)
    {
        $result = array();

        $pagePartAdminConfigurators = $this->getPagePartAdminConfigurators($page);
        foreach ($pagePartAdminConfigurators as $pagePartAdminConfigurator) {
            $context = $pagePartAdminConfigurator->getContext();
            if (!in_array($context, $result)) {
                $result[] = $context;
            }
        }

        return $result;
    }
1018109
public function page($page = null) {
		if ($page) {
			$this->_config['page'] = $page = ((integer) $page ?: 1);
			$this->offset(($page - 1) * $this->_config['limit']);
			return $this;
		}
		return $this->_config['page'];
	}
259728
public function getStatus(Page $page)
    {
        $this->authorize('edit', $page);

        return view("$this->viewPrefix.status", [
            'page'    => $page,
            'version' => $page->getCurrentVersion(),
            'auth'    => auth(),
        ]);
    }
1049737
public function getList($page = 1)
    {
        $this->checkPageNumber($page);

        return $this->adapter->get(sprintf('/companies?page=%d', $page));
    }
322620
protected function buildRevisionsNav(&$page)
    {
        if (empty($page['rcmIncludeRevisions'])) {
            return $page;
        }

        if (empty($page['pages'])) {
            $page['pages'] = [];
        }

        foreach ($page['rcmIncludeRevisions'] as $config) {
            $published = (bool)$config['published'];
            $limit = (int)$config['limit'];

            $revisions = $this->getRevisionList($published, $limit);

            if (empty($revisions['revisions'])) {
                continue;
            }

            foreach ($revisions['revisions'] as $revision) {
                $pageConfig = $config['page'];

                array_walk_recursive(
                    $pageConfig,
                    [
                        $this,
                        'parseRevisionConfigValue'
                    ],
                    $revision
                );

                $page['pages'][] = $pageConfig;
            }
        }

        return $page;
    }