Returns widgets data grouped by place (place is a key).
@param \Ufo\Core\Section $section
@return array
178436
public function getWidgetsData(Section $section): array
    {
        switch ($this->config->widgetsStorageType) {
            
            case $this->config::STORAGE_TYPE_DB:
                $storage = new WidgetsDbStorage($this->db);
                break;
                
            case $this->config::STORAGE_TYPE_ARRAY:
                if (!empty($this->config->widgetsStoragePath) 
                && file_exists($this->config->projectPath . $this->config->widgetsStoragePath)) {
                    $storageData = require $this->config->projectPath . $this->config->widgetsStoragePath;
                } else {
                    $storageData = $this->config->widgetsStorageData;
                }
                $storage = new WidgetsArrayStorage($storageData);
                break;
                
            default:
                return [];
                
        }
        
        return $storage->getWidgets($section);
    }
972532
public function renderSection(Section $section)
    {
        $output = sprintf("[%s]\n", $section->getName());

        foreach ($section->getProperties() as $key => $value) {
            $value = $this->normalizeValue($value);
            $output .= sprintf("%s = %s\n", $key, $value);
        }

        // Write a linefeed after sections
        $output .= "\n";

        return $output;
    }
460245
function getWidgets()
    {
        $return = [];
        foreach (array_keys($this->__widgets) as $region)
            $return[$region] = $this->getRegionWidgets($region);

        return $return;
    }
1024467
function widgetsLayout(): array
    {
        if(!$this->layoutBuilt) {
            $this->buildWidgetsLayout();
            $this->layoutBuilt = true;
        }

        return [
            "rows" => collect($this->rows)->map(function(DashboardLayoutRow $row) {
                return $row->toArray();
            })->all()
        ];
    }
1103688
public function getSection()
    {
        if (null === $this->_section) {
            $this->setSection(new Section($this->getUid(), array('page' => $this)));
        }

        return $this->_section;
    }
995425
public function get_section_name($section) {
        $section = $this->get_section($section);
        if ((string)$section->name !== '') {
            // Return the name the user set.
            return format_string($section->name, true, array('context' => context_course::instance($this->courseid)));
        } else {
            return $this->get_default_section_name($section);
        }
    }
971134
private function findSection($section)
	{
		// Check section type
		if (is_int($section) || $section === 'new') {
			return $section;
		} else if (is_string($section)) {
			// Search section names for related index
			$sections = array_keys($this->sections->byName);
			$index = array_search($section, $sections);

			// Return index if found
			if ($index !== false) {
				return $index;
			}
		}

		// Return error message and value
		$this->error = array();
		$this->error['page'] = "Section '$section' was not found on this page";
		return -1;
	}
804204
protected function getSectionStructureFromIncomingStructure($section)
    {
        $pos = strpos($section, '.');
        if ($pos === false) {
            $section = (int) $section;
            if ($section === 0) {
                return $this->structure;
            }

            return $this->structure->parts[($section - 1)];
        }
        $sections = explode('.', $section);
        $count = count($sections);
        $outObject = null;
        foreach ($sections as $section) {
            $section = (int) $section;
            if (!isset($outObject)) {
                $outObject = $this->getObjectStructureFromParts($this->structure, ($section - 1));
            } else {
                $outObject = $this->getObjectStructureFromParts($outObject, ($section - 1));
            }
        }

        return $outObject;
    }
1067701
public function getSectionUrls(string $section, array $criteria = [], $siteId = null): array
    {
        $criteria = array_merge([
            'section' => $section,
            'status' => 'enabled',
        ], $criteria);

        return $this->getElementUrls(Entry::class, $criteria, $siteId);
    }
1312451
public function getSection($section, $default = '')
    {
        $context = $this->_context;

        if (isset($context->sections[$section])) {
            return $context->sections[$section];
        } else {
            return $default;
        }
    }
1284710
public function info($section = null)
    {
        if ($section) {
            return $this->client->info($section);
        }

        return $this->client->info();
    }
360240
private function getSectionsNumbers(array $sections): array
    {
        $sectionsNumbers = array_column($sections, 'id');

        return array_combine($sectionsNumbers, array_fill_keys($sectionsNumbers, false));
    }
1142285
public function getConnectionParametersArray($section = 'runtime')
    {
        if (!in_array($section, ['runtime', 'generator'])) {
            return null;
        }

        $output = [];
        foreach ($this->config[$section]['connections'] as $connection) {
            $output[$connection] = $this->config['database']['connections'][$connection];
        }

        return $output;
    }
844305
public function getSectionIdx($section)
    {
        $idx = -1;
        foreach ($this->sections as $key => $accordion_section) {
            if ($accordion_section->name === $section->name) {
                $idx = $key;
                break;
            }
        }

        return $idx;
    }
333163
public function getSectionHistoryQuery(Section $section)
    {
        $queryBuilder = $this->createQueryBuilder('contribution')
            ->orderBy('contribution.creationDate', 'DESC')
            ->andWhere('contribution.section = :section')
            ->setParameter('section', $section);

        return $queryBuilder->getQuery();
    }
8837
public function getAllBySection($section, $default = null)
    {
        $items = $this->getSettingsConfig();

        if (isset($items[$section])) {
            $this->setting = ArrayHelper::getColumn($items[$section], 'value');
        } else {
            $this->setting = $default;
        }

        return $this->setting;
    }
829553
protected function check($section, $data)
    {

        // Normalized return array
        $normalized = [];

        if (isset($this->normalize[$section]) && !empty($this->normalize[$section])) {
            foreach ($this->normalize[$section] as $property => $raw) {
                // Default the value for the new key as null
                $value = null;

                if (is_array($raw)) {
                    // Iterate over the raw property we want to use
                    foreach ($raw as $check) {
                        if (array_key_exists($check, $data)) {
                            $value = $data[$check];
                            break;
                        }
                    }
                } else {
                    // String
                    if (array_key_exists($raw, $data)) {
                        $value = $data[$raw];
                    }
                }

                $normalized['gq_' . $property] = $value;
            }
        }

        return $normalized;
    }