Returns active Option name. Used to auto-generate options and entity names
@return string
@throws \Exception
321018
public function getName($option = null){
		if(empty($option)){
			$option = $this->getOptions();
		}
		$name = $option->getName();
		if (empty($name)) {
			throw new \Exception('Empty name');
		}
		return $name;
	}
1259328
public function getOptionsForm(): string
    {
        return
            '<div class="row form-group">' .
            '<label class="col-sm-3 col-form-label">' . I18N::translate('Surname option') . '</label>' .
            '<div class="col-sm-9">' .
            '<select class="form-control" name="surname">' .
            '<option value="replace" ' .
            ($this->surname === 'replace' ? 'selected' : '') .
            '">' . I18N::translate('Wife’s surname replaced by husband’s surname') . '</option><option value="add" ' .
            ($this->surname === 'add' ? 'selected' : '') .
            '">' . I18N::translate('Wife’s maiden surname becomes new given name') . '</option>' .
            '</select>' .
            '</div></div>' .
            parent::getOptionsForm();
    }
1360620
protected function getOptions()
	{
		$options = array();

		foreach ($this->element->children() as $option)
		{
			// Only add <option /> elements.
			if ($option->getName() != 'option')
			{
				continue;
			}

			// Set up option elements.
			$tmp = new stdClass;
			$tmp->value = (string) $option['value'];
			$tmp->text = trim((string) $option);
			$tmp->disable = ((string) $option['disabled'] == 'true');
			$tmp->class = (string) $option['class'];
			$tmp->onclick = (string) $option['onclick'];

			// Add the option object to the result set.
			$options[] = $tmp;
		}

		reset($options);

		return $options;
	}
112127
public function getOption($optionName)
    {
        if (!array_key_exists($optionName, $this->supportedOptions)) {
            throw new Exception(sprintf('The view option "%s" you\'re trying to get doesn\'t exist in class "%s".', $optionName, get_class($this)), 1359625876);
        }

        return $this->options[$optionName];
    }
301365
public function getSelectName() : ?string
    {
        if (null !== $this->select_name) {
            return $this->select_name . ' as ' . $this->getDBName();
        }
        if (null !== $this->db_name) {
            return $this->db_name;
        }
        return $this->attributes['name'];
    }
617547
public static function getCurrentProviderId()
    {
        try {
            $optionValue = Option::get(self::CURRENT_PROVIDER_OPTION_NAME);
        } catch (\Exception $e) {
            $optionValue = false;
        }
        return $optionValue === false ? DefaultProvider::ID : $optionValue;
    }
114440
public function activeClass(string $className = ''): string
    {
        if (! $className) {
            $className = config('menus.active_class_name');
        }

        return $this->isActive() ? $className : '';
    }
161366
protected function getOptions()
	{
		// Initialize some field attributes.
		$client = (string) $this->element['client'];
		if ($client != 'site' && $client != 'administrator')
		{
			$client = 'site';
		}

		$client_id = 0;

		if ($client == 'administrator')
		{
			$client_id = 1;
		}

		$path = PATH_APP . DS . 'bootstrap' . DS . $client;
		if (!is_dir($path))
		{
			$path = PATH_CORE . DS . 'bootstrap' . DS . $client;
		}

		// Merge any additional options in the XML definition.
		$options = array_merge(
			parent::getOptions(),
			App::get('language')->getList($this->value, $path, true, true, $client_id)
		);

		return $options;
	}
948329
protected function _getOptions()
    {
        if (array_key_exists('name', $this->_properties)) {
            $options = Setting::options($this->_properties['name']);
            if (is_callable($options)) {
                return $options();
            }
            return $options;
        }
        return false;
    }
146515
public function getCurrentSelectionName()
    {
        $name = $this->getDefaultSelectionName();

        if ($this->getCurrentContainerName()) {
            $name = $this->getCurrentContainerLabel();
            if ($this->getCurrentStoreName()) {
                $name .= " > " . $this->getCurrentStoreName();
            }
        }

        return $name;
    }
1037026
public function getPrintableName() : string
    {
        $characteristic = $this->getCharacteristic();

        if ($characteristic === Option::LONG)
        {
            $prefix = '--';
        }
        elseif ($characteristic === Option::SHORT)
        {
            $prefix = '-';
        }

        return $prefix.$this->name;
    }
17957
public function toOptionArray()
    {
        if (null === $this->options) {
            $collection = $this->collectionFactory->create();
            $collection->addFieldToFilter('is_active', 1);
            $collection->setOrder('identifier', \Magento\Framework\Data\Collection::SORT_ORDER_ASC);

            $options = [
                [
                    'value' => '',
                    'label' => __('-- No Page --')
                ]
            ];

            foreach ($collection as $item) {
                /** @var \Magento\Cms\Model\Page $item */
                $options[] = [
                    'value' => $item->getIdentifier(),
                    'label' => $item->getTitle()
                ];
            }

            $this->options = $options;
        }

        return $this->options;
    }
85238
public function getOption(string $name)
    {
        if (!array_key_exists($name, $this->options)) {
            throw new Exception('Invalid option "'.$name.'" for field "'.$this->name.'"');
        }

        return $this->options[$name];
    }
1349525
public function getOptions($option = null)
    {
        $this->getAdapterOptions();
        if ($option !== null) {
            if (!isset($this->options[$option])) {
                throw new Exception\RuntimeException(sprintf(
                    'Options "%s" not found',
                    $option
                ));
            }
            return $this->options[$option];
        }
        return $this->options;
    }
777530
public function getEntityNameLink()
    {
        if ($this->hasEntityLink() && !$this->EntityLinkDisabled) {
            
            $target = $this->OpenEntityLinkInNewTab ? ' target="_blank"' : '';
            
            return sprintf(
                '<a href="%s" rel="nofollow"%s>%s</a>',
                $this->EntityLink,
                $target,
                $this->EntityName
            );
            
        }
        
        return $this->EntityName;
    }
221090
private function OptionsString()
    {
        if (!$this->select->Exists())
        {
            return '';
        }
        $list = new SelectListProvider($this->select);
        $options = $list->ToArray();
        $lines = array();
        foreach ($options as $key=>$value)
        {
            $lines[] = $key . ':' . $value;
        }
        return join("\r\n", $lines);
    }
771388
public function toActiveBranchElement()
    {
        $request    = $this->_getOriginalRequest();
        $activePath = $this->_findPath($request);

        if (! $activePath) {
            return null;
        }

        $this->setBranchVisible($activePath);

        $activeItem = array_pop($activePath);

        if (! $activeItem instanceof \Gems_Menu_SubMenuItem) {
            return null;
        }
        // \MUtil_Echo::track($activeItem->get('label'));

        $parameterSources[] = $request;

        if ($this->_menuParameters) {
            $parameterSources[] = $this->_menuParameters;
        }

        $source = new \Gems_Menu_ParameterCollector($parameterSources);
        // self::$verbose = true;

        $nav = $this->_toNavigationArray($source);

        $ul = $this->renderFirst();

        foreach ($nav as $item => $sub) {
            if ($sub['label'] === $activeItem->get('label')) {

                if (isset($sub['pages'])) {
                    $this->renderItems($ul, $sub['pages'], true);
                }

                return $ul;
            }
        }

        return null;
    }