Return the map of rate options by school and program.

@return array
Map. [school_id][program_id][[rate_option]]

@ingroup cache
549760
protected function getMapRateOptions() {
    $map = [];

    $cid = __METHOD__;
    if ($cache = $this->cache->get($cid)) {
      return $cache->data;
    }

    $domain = $this->getUrlFromOpenyProgramsSearchSettings('base_url');

    // Here we'll iterate over each program and scrape data for each school.
    // We should be careful in order not to make a high load on Daxko.
    $programs = $this->getAllChildCarePrograms();
    foreach ($programs as $program) {
      // Get a list of schools for particular program.
      $schools = $this->scrapeDaxkoSchoolsByProgram($program->id);

      // @todo Check whether we were scraping correct page (with schools).
      $school_pages = $schools->each(function ($school) {
        $href = $school->attr('href');
        return [
          'url' => $href,
          'id' => $this->getQueryParam('location_id', $href),
        ];
      });

      // Scrape each school page to get the rates url.
      foreach ($school_pages as $school_page) {
        $url = $domain . $school_page['url'];
        $source = $this->getDaxkoPageSource($url);
        $this->crawler->clear();
        $this->crawler->addHtmlContent($source);
        $rate_list = $this->crawler->filter('#session-list-table tr.childcare-rate');

        // Scrape each rate item.
        $rate_data = $rate_list->each(function ($rate_data_item) {
          // Get context ID && session name.
          $link = $rate_data_item->filter('a.session-name');
          return [
            'context_id' => $this->getQueryParam('context_id', $link->attr('href')),
            'name' => $link->text(),
            'registration_url' => $link->attr('href'),
          ];
        });

        // Fill in map dada.
        if (!isset($map[$school_page['id']][$program->id])) {
          $map[$school_page['id']][$program->id] = [];
        }

        foreach ($rate_data as $rate_data_item) {
          $map[$school_page['id']][$program->id][$rate_data_item['context_id']] = $rate_data_item;
        }
      }
    }

    $this->cache->set($cid, $map);
    return $map;
  }
179073
protected function _getListOptionsForElem() {
		$cachePath = 'DefaultOptions_ViewExt_' . $this->_currUIlang;
		$cached = Cache::read($cachePath, CAKE_THEME_CACHE_KEY_HELPERS);
		if (!empty($cached)) {
			return $cached;
		}

		$result = [];
		$result['yesNo'] = [
			'yes' => __d('view_extension', 'Yes'),
			'no' => __d('view_extension', 'No')
		];
		$result['showEmpty'] = __d('view_extension', '&lt;None&gt;');
		$result['popupModalLink'] = [
			'escape' => false,
			'class' => 'popup-link',
			'target' => '_blank',
			'data-popover-placement' => 'auto top',
			'data-modal-title' => __d('view_extension', 'Detail information'),
		];
		$result['popupLink'] = [
			'escape' => false,
			'class' => 'popup-link',
			'target' => '_blank',
			'data-popover-placement' => 'auto top',
		];
		$result['modalLink'] = [
			'escape' => false,
			'data-modal-title' => __d('view_extension', 'Detail information'),
		];
		$result['confirmLink'] = [
			'escape' => false,
			'data-confirm-msg' => __d('view_extension', 'Are you sure you wish to delete this data?'),
			'data-confirm-btn-ok' => __d('view_extension', 'Yes'),
			'data-confirm-btn-cancel' => __d('view_extension', 'No')
		];
		$result['paginationSortPjax'] = [
			'linkOpt' => [
				'title' => __d('view_extension', 'Click to sort by this fiels'),
				'data-toggle' => 'pjax'
			],
			'iconDir' => [
				'asc' => $this->iconTag('fas fa-long-arrow-alt-up'),
				'desc' => $this->iconTag('fas fa-long-arrow-alt-down'),
			]
		];
		$result['truncateText'] = [
			'truncateOpt' => [
				'ellipsis' => $this->Html->link($this->iconTag('fas fa-angle-double-right'), '#', [
					'role' => 'button',
					'escape' => false,
					'data-toggle' => 'collapse-text-expand',
					'class' => 'collapse-text-action-btn',
					'title' => __d('view_extension', 'Expand text')
					]),
				'exact' => false,
				'html' => true
			],
			'collapseLink' => $this->Html->link($this->iconTag('fas fa-angle-double-left'), '#', [
				'role' => 'button',
				'escape' => false,
				'data-toggle' => 'collapse-text-roll-up',
				'class' => 'collapse-text-action-btn',
				'title' => __d('view_extension', 'Roll up text')
			])
		];
		$result['form'] = [
			'role' => 'form',
			'requiredcheck' => true,
			'data-required-msg' => __d('view_extension', 'Please fill in this field'),
		];
		$result['barPaging'] = [
			'firstPage' => [
				'icon' => $this->iconTag('fas fa-angle-double-left'),
				'linkOpt' => [
					'tag' => 'li',
					'escape' => false,
					'title' => __d('view_extension', 'First page'),
					'data-toggle' => 'tooltip',
				]
			],
			'previousPage' => [
				'icon' => $this->iconTag('fas fa-angle-left'),
				'linkOpt' => [
					'tag' => 'li',
					'escape' => false,
					'title' => __d('view_extension', 'Previous page'),
					'data-toggle' => 'tooltip',
				]
			],
			'numbers' => [
				'separator' => '',
				'ellipsis' => '...',
				'tag' => 'li',
				'currentLink' => true,
				'currentClass' => 'active',
				'currentTag' => 'a'
			],
			'nextPage' => [
				'icon' => $this->iconTag('fas fa-angle-right'),
				'linkOpt' => [
					'tag' => 'li',
					'escape' => false,
					'title' => __d('view_extension', 'Next page'),
					'data-toggle' => 'tooltip',
				]
			],
			'lastPage' => [
				'icon' => $this->iconTag('fas fa-angle-double-right'),
				'linkOpt' => [
					'tag' => 'li',
					'escape' => false,
					'title' => __d('view_extension', 'Last page'),
					'data-toggle' => 'tooltip',
				]
			],
			'showList' => [
				'icon' => $this->iconTag('fas fa-align-justify'),
				'linkOpt' => [
					'title' => __d('view_extension', 'Show as list'),
					'escape' => false
				]
			],
			'goToPage' => [
				'link' => $this->Html->link(
					$this->iconTag('fas fa-ellipsis-h'),
					'#',
					[
						'role' => 'button',
						'escape' => false,
						'data-toggle' => 'collapse',
						'aria-expanded' => 'false',
						'data-target' => '.control-go-to-page',
						'title' => __d('view_extension', 'Go to the page'),
					]
				),
				'spin' => [
					'id' => 'gotopagebar',
					'class' => 'input-sm',
					'autocomplete' => 'off',
					'min' => '1',
					'step' => '1',
					'verticalbuttons' => 'false',
					'postfix' => $this->iconTag('fas fa-share'),
					'postfix_extraclass' => 'btn btn-default btn-go-to-page',
					'title' => __d('view_extension', 'The page number to quickly jump')
				]
			],
			'numLines' => [
				'id' => 'numlinesbar',
				'type' => 'select',
				'style' => 'btn-default btn-sm',
				'width' => false,
				'live-search' => false,
				'size' => 'auto',
				'class' => 'form-control show-tick filter-condition input-sm',
				'autocomplete' => 'off',
				'div' => false,
				'label' => false,
				'title' => __d('view_extension', 'Number of lines'),
			]
		];
		$result['buttonsMove'] = [
			'btnDrag' => $this->buttonLink(
				'fas fa-arrows-alt',
				'btn-primary',
				'#',
				[
					'role' => 'button',
					'data-toggle' => 'drag',
					'title' => __d('view_extension', 'Drag and drop this item'),
				]
			),
			'btnsMove' => [
				[
					'icon' => 'fas fa-angle-double-up',
					'title' => __d('view_extension', 'Move top'),
					'url' => ['top']
				],
				[
					'icon' => 'fas fa-angle-up',
					'title' => __d('view_extension', 'Move up'),
					'url' => ['up']
				],
				[
					'icon' => 'fas fa-angle-down',
					'title' => __d('view_extension', 'Move down'),
					'url' => ['down']
				],
				[
					'icon' => 'fas fa-angle-double-down',
					'title' => __d('view_extension', 'Move bottom'),
					'url' => ['bottom']
				],
			]
		];
		$result['loadMore'] = [
			'linkTitle' => __d('view_extension', 'Load more'),
			'linkOpt' => [
				'role' => 'button',
				'data-toggle' => 'load-more',
				'title' => __d('view_extension', 'Load more informations')
			]
		];
		$result['btnPrint'] = $this->button(
			'fas fa-print fa-lg',
			'btn btn-default',
			[
				'data-toggle' => 'print',
				'class' => 'view-extension-print-btn',
				'title' => __d('view_extension', 'Print this page')
			]
		);
		$result['btnHeaderMenu'] = $this->ExtBs3Form->button(
			$this->iconTag('fas fa-bars fa-lg') . '&nbsp;' .
			$this->Html->tag('span', '', ['class' => 'caret']),
			[
				'type' => 'button',
				'class' => 'btn btn-default dropdown-toggle',
				'data-toggle' => 'dropdown',
				'title' => __d('view_extension', 'Menu of operations'),
				'aria-haspopup' => 'true',
				'aria-expanded' => 'false',
				'id' => 'pageHeaderMenu'
			]
		);
		Cache::write($cachePath, $result, CAKE_THEME_CACHE_KEY_HELPERS);

		return $result;
	}
1138921
public function getAsPair()
    {
        $result = array();

        foreach ($this->data as $key => $options) {
            $result[$key] = $options[self::CACHE_PARAM_VALUE];
        }

        return $result;
    }
19032
final public static function getValues(): array
    {
        if (isset(self::$cache[static::class])) {
            return self::$cache[static::class];
        }

        $rc = new \ReflectionClass(static::class);

        return self::$cache[static::class] = $rc->getConstants();
    }
788293
protected function get_options() {
        $options = parent::get_options();
        $options['groupid'] = $this->groupid;
        $options['courseid'] = $this->courseid;
        return $options;
    }
167185
public function getCompilerPasses(): array
    {
        $mappingBagProvider = $this->getMappingBagProvider();

        return $mappingBagProvider instanceof MappingBagProvider
            ? array_merge(
                parent::getCompilerPasses(),
                [new MappingCompilerPass($mappingBagProvider)]
            )
            : parent::getCompilerPasses();
    }
361331
public function getProgramOptions() {
    static $options = [];

    if (!$options) {
      $options = ['all' => $this->t('All')];
      $query = $this->entityQuery
        ->get('node')
        ->condition('status', 1)
        ->condition('type', 'program');
      $entity_ids = $query->execute();
      $nodes = $this->entityTypeManager->getStorage('node')
        ->loadMultiple($entity_ids);
      foreach ($nodes as $id => $node) {
        $options[$id] = $node->getTitle();
      }
    }

    return $options;
  }
833545
public function getClassMap()
    {
        $unifiedNamespaceClassMapOfCommunityEdition = parent::getClassMap();

        $professionalEditionRootPath = $this->facts->getProfessionalEditionRootPath();
        $unifiedNamespaceClassMapOfProfessionalEdition = $this->resolveUnifiedNamespaceClassMap($professionalEditionRootPath);

        return array_merge($unifiedNamespaceClassMapOfCommunityEdition, $unifiedNamespaceClassMapOfProfessionalEdition);
    }
1364982
public function getClassmap()
  {
    $classmap = $this->classmap;
    $classes  = [] ;

    if (!empty($classmap)) {
      foreach ($classmap as $class) {
        // Can't use end because of strict mode :(
        $name = current(array_slice(explode('\\', $class), -1, 1, true));

        $classes[$name] = $class;
      }
    }

    return $classes;
  }
639912
protected function getClassMap()
    {
        $phpconfClassmap = array();

        $generatorConfig = $this->getGeneratorConfig();

        foreach ($this->getDataModels() as $dataModel) {

            foreach ($dataModel->getDatabases() as $database) {

                $classMap = array();

                foreach ($database->getTables() as $table) {

                    if (!$table->isForReferenceOnly()) {

                        // -----------------------------------------------------
                        // Add TableMap class,
                        //     Peer, Object & Query stub classes,
                        // and Peer, Object & Query base classes
                        // -----------------------------------------------------
                        // (this code is based on PropelOMTask)

                        foreach (array('tablemap', 'peerstub', 'objectstub', 'querystub', 'peer', 'object', 'query') as $target) {
                            $builder = $generatorConfig->getConfiguredBuilder($table, $target);
                            $classMap[$builder->getFullyQualifiedClassname()] = $builder->getClassFilePath();
                        }

                        // -----------------------------------------------------
                        // Add children classes for object and query,
                        // as well as base child query,
                        // for single tabel inheritance tables.
                        // -----------------------------------------------------

                        if ($col = $table->getChildrenColumn()) {
                            if ($col->isEnumeratedClasses()) {
                                foreach ($col->getChildren() as $child) {
                                    foreach (array('objectmultiextend', 'queryinheritance', 'queryinheritancestub') as $target) {
                                        $builder = $generatorConfig->getConfiguredBuilder($table, $target);
                                        $builder->setChild($child);
                                        $classMap[$builder->getFullyQualifiedClassname()] = $builder->getClassFilePath();
                                    }
                                }
                            }
                        }

                        // -----------------------------------------------------
                        // Add base classes for alias tables (undocumented)
                        // -----------------------------------------------------

                        $baseClass = $table->getBaseClass();
                        if ($baseClass !== null) {
                            $className = ClassTools::classname($baseClass);
                            if (!isset($classMap[$className])) {
                                $classPath = ClassTools::getFilePath($baseClass);
                                $classMap[$className] = $classPath;
                            }
                        }

                        $basePeer = $table->getBasePeer();
                        if ($basePeer !== null) {
                            $className = ClassTools::classname($basePeer);
                            if (!isset($classMap[$className])) {
                                $classPath = ClassTools::getFilePath($basePeer);
                                $classMap[$className] = $classPath;
                            }
                        }

                        // ----------------------------------------------
                        // Add classes for interface
                        // ----------------------------------------------

                        if ($table->getInterface()) {
                            $builder = $generatorConfig->getConfiguredBuilder($table, 'interface');
                            $classMap[$builder->getFullyQualifiedClassname()] = $builder->getClassFilePath();
                        }

                        // ----------------------------------------------
                        // Add classes from old treeMode implementations
                        // ----------------------------------------------

                        if ($table->treeMode() == 'MaterializedPath') {
                            foreach (array('nodepeerstub', 'nodestub', 'nodepeer', 'node') as $target) {
                                $builder = $generatorConfig->getConfiguredBuilder($table, $target);
                                $classMap[$builder->getFullyQualifiedClassname()] = $builder->getClassFilePath();
                            }
                        }
                        if ($table->treeMode() == 'NestedSet') {
                            foreach (array('nestedset', 'nestedsetpeer') as $target) {
                                $builder = $generatorConfig->getConfiguredBuilder($table, $target);
                                $classMap[$builder->getFullyQualifiedClassname()] = $builder->getClassFilePath();
                            }
                        }

                        // ----------------------------------
                        // Add classes added by behaviors
                        // ----------------------------------
                        if ($table->hasAdditionalBuilders()) {
                            foreach ($table->getAdditionalBuilders() as $builderClass) {
                                $builder = new $builderClass($table);
                                $builder->setGeneratorConfig($generatorConfig);
                                $classMap[$builder->getFullyQualifiedClassname()] = $builder->getClassFilePath();
                            }
                        }
                    } // if (!$table->isReferenceOnly())
                }

                $phpconfClassmap = array_merge($phpconfClassmap, $classMap);
            }
        }

        // sort the classmap by class name, to avoid discrepancies between OS
        ksort($phpconfClassmap);

        return $phpconfClassmap;
    }
1058986
public function groupOptions() {
        return array_map(function ($node) {
            return [$node->getAttribute("value"),
                $this->readOptions($this->xpath->query("./option", $node))];
        }, iterator_to_array($this->xpath->query("./optgroup", $this->domNode)));
    }
1064582
final public static function getOptions()
    {
        $options = static::$mapper_options;
        $options['attributes'] = static::$attributes;

        $called_class = get_called_class();
        if ($called_class == __CLASS__) {
            return $options;
        }

        $parent_class = get_parent_class($called_class);
        $parent_options = $parent_class::getOptions();

        $options['attributes'] = array_merge($parent_options['attributes'], $options['attributes']);
        $options = array_merge($parent_options, $options);

        return $options;
    }
1224139
public function toOptionArray() {
        return [
            [
                'value' => self::MODE_CARDS,
                'label' => __('Cards')
            ],
            [
                'value' => self::MODE_MIXED,
                'label' => __('Mixed')
            ],
            [
                'value' => self::MODE_LOCAL,
                'label' => __('Local payments')
            ] 
        ];
    }
508319
public function getExchangeRateList()
    {
        if (!empty($this->exchangeRateList)) {
            return $this->exchangeRateList;
        }

        $this->exchangeRateList = [];

        $currencyBase = $this
            ->currencyRepository
            ->findOneBy([
                'iso' => $this->exchangeCurrencyIso,
            ]);

        $availableExchangeRates = $this
            ->currencyExchangeRateRepository
            ->findBy([
                'sourceCurrency' => $currencyBase,
            ]);

        /**
         * @var CurrencyExchangeRate $exchangeRate
         */
        foreach ($availableExchangeRates as $exchangeRate) {
            $targetCurrency = $exchangeRate->getTargetCurrency();
            $targetCurrencyIso = $targetCurrency->getIso();

            $this->exchangeRateList[$targetCurrencyIso] = [
                'rate' => $exchangeRate->getExchangeRate(),
                'currency' => $targetCurrency,
            ];
        }

        return $this->exchangeRateList;
    }
1328774
private function getOptions()
    {
        $options = [];
        foreach($this->optionsMap as $property => $name) {
            $options[$name] = $this->options[$property];
        }
        return $options;
    }
888813
public function getExchangeRates()
    {
        $exchangeRates = [];
        $response = $this
            ->client
            ->get(
                'http://finance.yahoo.com/webservice/v1/symbols/allcurrencies/quote',
                [
                    'query' => [
                        'format' => 'json',
                    ],
                ]
            )
            ->json();

        foreach ($response['list']['resources'] as $resource) {
            $fields = $resource['resource']['fields'];
            $symbol = str_replace('=X', '', $fields['symbol']);
            $exchangeRates[$symbol] = (float) $fields['price'];
        }

        return $exchangeRates;
    }
618777
public function getOptionRoutes()
    {
        $cached = $this->cacheProvider->fetch('cached_restutils_route_options');
        if ($cached) {
            return $cached;
        }
        $ret = array_filter(
            $this->router->getRouteCollection()->all(),
            function ($route) {
                if (!in_array('OPTIONS', $route->getMethods())) {
                    return false;
                }
                // ignore all schema routes
                if (strpos($route->getPath(), '/schema') === 0) {
                    return false;
                }
                if ($route->getPath() == '/' || $route->getPath() == '/core/version') {
                    return false;
                }

                return is_null($route->getRequirement('id'));
            }
        );
        $this->cacheProvider->save('cached_restutils_route_options', $ret);
        return $ret;
    }