ProvinceOptions -----------------------
179490
public function run() {

		$provinceId	= Yii::$app->request->post( 'province-id' );

		if( isset( $provinceId ) && $provinceId > 0 ) {

			$regions = $this->modelService->getMapByProvinceId( $provinceId );

			// Trigger Ajax Success
			return AjaxUtil::generateSuccess( Yii::$app->coreMessage->getMessage( CoreGlobal::MESSAGE_REQUEST ), $regions );
		}

		// Trigger Ajax Failure
		return AjaxUtil::generateFailure( Yii::$app->coreMessage->getMessage( CoreGlobal::ERROR_NOT_FOUND ) );
	}
23732
public function getOptions(ServerRequestInterface $request): void
    {
        parent::getOptions($request);

        $this->surname = $request->get('surname', 'replace');
    }
1259906
public function defaultSelectizeOptions()
    {
        $metadata = $this->metadata();
        $options = [];

        if (isset($metadata['data']['selectize_options'])) {
            $options = $metadata['data']['selectize_options'];
            $options = $this->parseSelectizeOptions($options);
        }

        if ($this->deferred()) {
            $placeholder = $this->translator()->trans('Search...');
        } else {
            $placeholder = $this->translator()->trans('Select...');
        }

        $options['placeholder'] = $placeholder;
        $prop = $this->property();
        if ($prop instanceof SelectablePropertyInterface) {
            $choices = iterator_to_array($this->choices());

            if (isset($options['options'])) {
                $options['options'] = array_merge($options['options'], $choices);
            } else {
                $options['options'] = $choices;
            }

            $items = $this->propertyVal();

            if ($prop instanceof AbstractProperty) {
                $items = $prop->parseVal($items);

                if ($prop->l10n()) {
                    $items = (string)$this->translator()->translation($items);
                }

                if (is_string($items)) {
                    $items = explode($prop->multipleSeparator(), $items);
                }
            }

            if (!$prop->multiple()) {
                $items = (array)$items;
            }

            if (!$items) {
                $items = [];
            }

            // workaround for object setter casting the property as object.
            if ($items instanceof ModelInterface) {
                $items = $this->mapObjToChoice($items)['value'];
            }

            if (is_scalar($items)) {
                $items = [$items];
            }

            if (!isset($options['items'])) {
                $options['items'] = [];
            }
            $options['items'] = array_merge($options['items'], $items);
        }

        return $options;
    }
1219646
public static function cityArea($field, $title, $province = [], $city = '', $area = '')
    {
        if (is_array($province))
            $value = $province;
        else
            $value = [(string)$province, (string)$city, (string)$area];

        $cascader = self::cascader($field, $title, $value, Cascader::TYPE_CITY_AREA);
        $cascader->jsData('province_city_area');
        return $cascader;
    }
1111585
public static function city($field, $title, $province = [], $city = '')
    {
        if (is_array($province))
            $value = $province;
        else
            $value = [(string)$province, (string)$city];

        $cascader = self::cascader($field, $title, $value, Cascader::TYPE_CITY);
        $cascader->jsData('province_city');
        return $cascader;
    }
240136
protected function configureOptions(OptionsResolver $options): void
    {
        $distanceAllowedValues = function ($value) {
            return !($value < 500 || $value > 20000);
        };

        $options->setRequired(['origin', 'dest']);

        $options->setDefined([
            'via',
            'useTog', 'useBus', 'useMetro', 'useBicycle',
            'maxWalkingDistanceDep', 'maxWalkingDistanceDest',
            'maxCyclingDistanceDep', 'maxCyclingDistanceDest',
            'date',
        ]);

        $options->setAllowedTypes('origin', [LocationResponse::class, StopLocationResponse::class]);
        $options->setAllowedTypes('dest', [LocationResponse::class, StopLocationResponse::class]);
        $options->setAllowedTypes('via', [LocationResponse::class, StopLocationResponse::class]);

        $options->setAllowedValues('useTog', [0, 1]);
        $options->setAllowedValues('useBus', [0, 1]);
        $options->setAllowedValues('useMetro', [0, 1]);
        $options->setAllowedValues('useBicycle', [0, 1]);

        $options->setAllowedValues('maxWalkingDistanceDep', $distanceAllowedValues);
        $options->setAllowedValues('maxWalkingDistanceDest', $distanceAllowedValues);
        $options->setAllowedValues('maxCyclingDistanceDep', $distanceAllowedValues);
        $options->setAllowedValues('maxCyclingDistanceDest', $distanceAllowedValues);

        $options->setAllowedTypes('date', \DateTime::class);
    }
616520
private void setupModeOptions() {

        int versionsDeleted = OpenCms.getSystemInfo().getHistoryVersionsAfterDeletion();

        String mode;

        if (versionsDeleted == 0) {
            mode = CmsFileHistoryApp.MODE_DISABLED;
        } else if (versionsDeleted == 1) {
            mode = CmsFileHistoryApp.MODE_WITHOUTVERSIONS;
        } else if ((versionsDeleted > 1) || (versionsDeleted == -1)) {
            mode = CmsFileHistoryApp.MODE_WITHVERSIONS;
        } else {
            mode = CmsFileHistoryApp.MODE_DISABLED;
        }
        m_mode.setValue(mode);
    }
866778
function(regions){
    var that = this;

    var defaults = {
      regionType: Marionette.getOption(this, "regionType"),
      parentEl: function(){ return that.$el; }
    };

    return this.regionManager.addRegions(regions, defaults);
  }
667174
def areas_select(name, collection, options = {})
      selectables = if collection.first.is_a?(Decidim::Area)
                      assemblies = collection
                                   .map { |a| [a.name[I18n.locale.to_s], a.id] }
                                   .sort_by { |arr| arr[0] }

                      @template.options_for_select(
                        assemblies,
                        selected: options[:selected]
                      )
                    else
                      @template.option_groups_from_collection_for_select(
                        collection,
                        :areas,
                        :translated_name,
                        :id,
                        :translated_name,
                        selected: options[:selected]
                      )
                    end

      select(name, selectables, options)
    end
950855
private void updateRegion() {
		actMessagePanel.setVisible(false);

		if (rbtACT.isSelected()) {
			actMessagePanel.setVisible(true);
			regionFields.setVisible(true);
			regionSelector.setOptions(new String[]{null, "Belconnen", "City", "Woden"});
			regionSelector.setVisible(true);
		} else if (rbtNSW.isSelected()) {
			regionFields.setVisible(true);
			regionSelector.setOptions(
					new String[]{null, "Hunter", "Riverina", "Southern Tablelands"});
			regionSelector.setVisible(true);
		} else if (rbtVIC.isSelected()) {
			regionFields.setVisible(true);
			regionSelector.setOptions(
					new String[]{null, "Gippsland", "Melbourne", "Mornington Peninsula"});
			regionSelector.setVisible(true);
		} else {
			regionSelector.setOptions(new Object[]{null});
			regionSelector.setVisible(false);
			regionFields.setVisible(false);
		}
	}
625609
public function initOptions()
    {
        if ($remote = TbArray::popValue('remote', $this->options)) {
            $this->options['remote'] = CHtml::normalizeUrl($remote);
        }

        TbArray::defaultValue('backdrop', $this->backdrop, $this->options);
        TbArray::defaultValue('keyboard', $this->keyboard, $this->options);
        TbArray::defaultValue('show', $this->show, $this->options);
    }
896590
public function fitsToCountry($data) {
		if (!isset($data['country_id']) || !isset($data['country_province_id'])) {
			return true;
		}
		$res = $this->Countries->States->find('list', [
			'conditions' => ['country_id' => $data['country_id']]
		])->toArray();
		if (empty($res) || array_shift($data) == 0) {
			$data['country_province_id'] = 0;
		} elseif (empty($data['country_province_id']) || !array_key_exists($data['country_province_id'], $res)) {
			return false;
		}
		return true;
	}
1367180
function(){
				if(data.modules.can) {
					canRoute = data.modules.can.route;
					routeData = canRoute.data;
					canReflect.onKeyValue(routeData, "statusCode", noop);
				}
			}
703806
public function exportOptions()
    {
        $this->normalizeOptions();
        
        $data['name'] = $this->getName();
        $data['driver'] = $this->getDriver();
        $data['data'] = $this->getData();
        $data['caption'] = $this->getCaption();
        $data['hideGrid'] = $this->getHideGrid();
        $data['hiddenGrid'] = $this->getHiddenGrid();
        $data['height'] = $this->getHeight();
        $data['autoWidth'] = $this->getAutoWidth();
        $data['forceFit'] = $this->getForceFit();
        $data['shrinkToFit'] = $this->getShrinkToFit();
        $data['colNames'] = $this->getColNames();
        $data['colModel'] = $this->getColModel();
        $data['pagerEnabled'] = $this->isPagerEnabled();
        $data['viewRecordsEnabled'] = $this->isViewRecordsEnabled();
        $data['rowNum'] = $this->getRowNum();
        $data['rowList'] = $this->getRowList();
        $data['sortname'] = $this->getSortName();
        $data['sortorder'] = $this->getSortOrder();
        $data['groupingEnabled'] = $this->isGroupingEnabled();
        $data['groupingViewOptions'] = $this->getGroupingViewOptions();
        $data['rowNumbersEnabled'] = $this->isRowNumbersEnabled();
        $data['sortableEnabled'] = $this->isSortableEnabled();
        $data['searchOptions'] = $this->getSearchOptions();
        $data['searchBtnEnabled'] = $this->isSearchButtonEnabled();
        $data['addBtnEnabled'] = $this->isAddButtonEnabled();
        $data['addBtnUri'] = $this->getAddBtnUri();
        $data['editBtnEnabled'] = $this->isEditButtonEnabled();
        $data['editBtnUri'] = $this->getEditBtnUri();
        $data['deleteBtnEnabled'] = $this->isDeleteButtonEnabled();
        $data['deleteBtnUri'] = $this->getDeleteBtnUri();
        $data['multiselect'] = $this->isMultiSelectEnabled();
        $data['massActionsEnabled'] = $this->isMassActionsEnabled();
        $data['massActions'] = $this->getMassActions();
        $data['dependentDataGrids'] = $this->getDependentDataGrids();
        $data['dependentGrid'] = $this->isDependentGrid();
        $data['treeName'] = $this->getTreeName();
        $data['multiSelectSortableEnabled'] = $this->isMultiSelectSortableEnabled();
        $data['multiSelectSortableColumn'] = $this->getMultiSelectSortableColumn();
        $data['customButtons'] = $this->getcustomButtonsAsOptions();
      
        return $data;
    }
635622
protected function defaultOptions()
    {
        $this->options = ArrayHelper::merge($this->options, $this->module->widgetOptions);
        $this->clientOptions = ArrayHelper::merge($this->clientOptions, $this->module->widgetClientOptions);
        if (!isset($this->options['id'])) {
            if ($this->hasModel()) {
                $this->options['id'] = Html::getInputId($this->model, $this->attribute);
            } else {
                $this->options['id'] = $this->getId();
            }
        }
        Html::addCssClass($this->options, 'form-control');

        $this->setOptionsKey('imageUpload', $this->module->imageUploadRoute);
        $this->setOptionsKey('fileUpload', $this->module->fileUploadRoute);

        $this->clientOptions['imageUploadErrorCallback'] = ArrayHelper::getValue($this->clientOptions, 'imageUploadErrorCallback', new JsExpression("function(json){alert(json.error);}"));
        $this->clientOptions['fileUploadErrorCallback'] = ArrayHelper::getValue($this->clientOptions, 'fileUploadErrorCallback', new JsExpression("function(json){alert(json.error);}"));

        if (isset($this->clientOptions['plugins']) && array_search('imagemanager', $this->clientOptions['plugins']) !== false) {
            $this->setOptionsKey('imageManagerJson', $this->module->imageManagerJsonRoute);
        }
        if (isset($this->clientOptions['plugins']) && array_search('filemanager', $this->clientOptions['plugins']) !== false) {
            $this->setOptionsKey('fileManagerJson', $this->module->fileManagerJsonRoute);
        }
    }
372011
private function updateRegional()
    {
        $currentLocale = $this->getCurrentLocaleEntity();

        if ( ! empty($regional = $currentLocale->regional())) {
            $suffix = $this->getConfig('utf-8-suffix', '.UTF-8');

            setlocale(LC_TIME, $regional.$suffix);
            setlocale(LC_MONETARY, $regional.$suffix);
        }
    }
1337631
private function setCountriesFromDB()
    {
        /** @var Country $item */
        foreach (app(Languages::class)->all() as $item) {
            $this->valueOptions[] = new Option($item->id, $item->name, ['data-country' => $item->code]);
        }
    }