Gets the name of the tag to cut.

@param $options

@return string

@throws \Exception
171736
protected function getTagName($options) {
    if ($options['tag']) {
      $tag_name = $options['tag'];
    }
    else {
      $tag_name = $this->ask('Enter the tag name for the deployment artifact, e.g., 1.0.0-build');
    }

    if (empty($tag_name)) {
      // @todo Validate tag name is valid, e.g., no spaces or special characters.
      throw new BltException("You must enter a valid tag name.");
    }
    else {
      $this->say("Tag is set to <comment>$tag_name</comment>.");
    }

    return $tag_name;
  }
412607
protected function resolveOptionsAlias(array $options)
	{
		$haystack = array_diff_key($options, $this->getAliasOptions() + ['output' => null]);
		
		foreach ($this->getAliasOptions() as $option => $value)
		{
			if (isset($options[$option]))
			{
				$haystack[$value] = $options[$option];
				
				if (is_bool($options[$option]))
				{
					$haystack[$value] = '';
				}
			}
		}
		
		return $haystack;
	}
780416
public function option(Option $option)
    {
        $value = $option->getLabel() ?: htmlentities($option->getValue(), ENT_QUOTES, 'UTF-8');
        $tag = new Tag('option', $value);

        if ($option->isSelected()) {
            $tag->setAttribute('selected', 'selected');
        }

        return $this->parseTag($tag, $option);
    }
43498
public static function Options( $options, $selected = NULL )
	{
		$list		= array();
		foreach( $options as $key => $value)
		{
			if( (string) $key != "_selected" && is_array( $value ) )
			{
				foreach( $options as $groupLabel => $groupOptions )
				{
					if( !is_array( $groupOptions ) )
						continue;
					if( (string) $groupLabel == "_selected" )
						continue;
					$groupName	= isset( $groupOptions['_groupname'] ) ? $groupOptions['_groupname'] : $groupLabel;
					$select		= isset( $options['_selected'] ) ? $options['_selected'] : $selected;
					$list[]		= self::OptionGroup( $groupName, $groupOptions, $select );
				}
				return implode( "", $list );
			}
		}
		foreach( $options as $value => $label )
		{
			$value		= (string) $value;
			$isSelected	= is_array( $selected ) ? in_array( $value, $selected ) : (string) $selected == (string) $value;
			$list[]		= self::Option( $value, $label, $isSelected );
		}
		return implode( "", $list );
	}
861264
protected function _getClassName($alias, array $options = [])
    {
        if (empty($options['className'])) {
            $options['className'] = Inflector::camelize($alias);
        }

        return App::className($options['className'], 'Model/Table', 'Table');
    }
319610
private function _parseOptions(SimpleXMLElement $options)
    {
        $array = array();

        /* @var $option SimpleXMLElement */
        foreach ($options as $option) {
            if ($option->count()) {
                $value = $this->_parseOptions($option->children());
            } else {
                $value = (string) $option;
            }

            $attr = $option->attributes();

            if (isset($attr->name)) {
                $array[(string) $attr->name] = $value;
            } else {
                $array[] = $value;
            }
        }

        return $array;
    }
186312
protected function renderOptionTags($options)
    {
        $output = '';
        if ($this->hasArgument('prependOptionLabel')) {
            $value = $this->hasArgument('prependOptionValue') ? $this->arguments['prependOptionValue'] : '';
            if ($this->hasArgument('translate')) {
                $label = $this->getTranslatedLabel($value, $this->arguments['prependOptionLabel']);
            } else {
                $label = $this->arguments['prependOptionLabel'];
            }
            $output .= $this->renderOptionTag($value, $label) . chr(10);
        }
        $output .= $this->renderOptionTagsInternal($options);

        return $output;
    }
808469
protected function _tooltipTitle(array $options, $tooltip)
    {
        if ($tooltip === true && !Arr::key('title', $options)) {
            $options['title'] = strip_tags($options['label']);
        }

        if (is_string($tooltip)) {
            $options['title'] = $tooltip;
        }

        return $options;
    }
1325769
public function getTagOptions($tag, $options)
    {
        return isset($this->tagOptions[$tag]) ? $this->tagOptions[$tag] : array();
    }
1022200
protected function getBlockName(array $options = [])
    {
        return isset($options['block_name']) ? $options['block_name'] : (isset($options['id']) ? $options['id'] : BlockUtil::createUniqueName());
    }
690467
protected function getRegex(Config\Options $options) : string
    {
        $regex = $options->get('regex');
        if (empty($regex)) {
            throw new ActionFailed('No regex option');
        }
        return $regex;
    }
534592
public function getTag($tagName)
    {
        foreach ($this->tags as $tag) {
            if ($tag['name'] === $tagName) {
                return $tag;
            }
        }

        throw new \InvalidArgumentException(sprintf(
            'Unknown tag "%s"', $tagName
        ));
    }
1012129
public static function select(array $options = []) : string {
		if (!empty($options['searchable'])) {
			$options['searchable'] = 'searchable';
		}
		if (!empty($options['preset'])) {
			$options['preset'] = 'preset';
		}
		if (!empty($options['tree'])) {
			$options['tree'] = 'tree';
		}
		if (!empty($options['color_picker'])) {
			$options['color_picker'] = 'color_picker';
		}
		return Factory::delegate('flag.numbers.framework.html', 'select', [$options]);
	}
321831
private function getRenderer(array $options)
    {
        if ($options['text']) {
            if ($options['badge']) {
                return function (TagInterface $tag) {
                    return sprintf(
                        '<span class="label label-%s"><i class="fa fa-%s"></i> %s</span>',
                        $tag->getTheme(), $tag->getIcon(), $tag->getName()
                    );
                };
            } else {
                return function (TagInterface $tag) {
                    return sprintf(
                        '<span class="text-%s"><i class="fa fa-%s"></i> %s</span>',
                        $tag->getTheme(), $tag->getIcon(), $tag->getName()
                    );
                };
            }
        } else {
            if ($options['badge']) {
                return function (TagInterface $tag) {
                    return sprintf(
                        '<span class="label label-%s" title="%s"><i class="fa fa-%s"></i></span>',
                        $tag->getTheme(), $tag->getName(), $tag->getIcon()
                    );
                };
            } else {
                return function (TagInterface $tag) {
                    return sprintf(
                        '<i class="text-%s fa fa-%s" title="%s"></i>',
                        $tag->getTheme(), $tag->getIcon(), $tag->getName()
                    );
                };
            }
        }
    }
656056
public function getName() {
		if ($this->_name === null) {
			$name = get_class($this);
			$pos = strrpos($name, '\\');
			if ($pos !== false) {
				$name = substr($name, $pos + 1);
			}
			if (preg_match('/^Twig([A-Za-z]+)Extension$/', $name, $matches)) {
				$name = $matches[1];
			}
			$this->_name = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $name));
		}
		return $this->_name;
	}
504809
private function getOptionsLabel(array $options, $suffix)
    {
        $label = sprintf('<info>%s:</info> ', $suffix);

        foreach ($options as &$option) {
            $option = sprintf('<comment>%s</comment>', $option);
        }

        return ['', $label . implode(', ', $options) . '.'];
    }
327268
public function extractAttributes($options = [])
    {
        if (!is_array($options)) {
            $options = [];
        }

        if (count($this->groupStack) > 0) {
            $options = $this->mergeWithLastGroup($options);
        }

        return Arr::except($options, $this->reserved);
    }