Returns options label

@param array  $options
@param string $suffix

@return string[]
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) . '.'];
    }
831924
public function endsWith($suffix)
    {
        return $suffix === ''
        || $suffix === mb_substr(
            $this->contents,
            -strlen((string) $suffix),
            null,
            $this->encoding
        );
    }
611759
public function getViewerTemplates($suffix = '')
    {
        $copy = $this->CopyContentFrom();
        if ($copy && $copy->exists()) {
            return $copy->getViewerTemplates($suffix);
        }

        return parent::getViewerTemplates($suffix);
    }
554219
protected function _parseOptions($options)
    {
        if (!empty($options['label']) && $options['label']) {
            if (!is_array($options['label'])) {
                $options['label'] = ['text' => $options['label']];
            }
            $options['label'] = array_merge_recursive($options['label'], ['class' => 'control-label']);
        }
        return parent::_parseOptions($options);
    }
981086
public function getOptions()
    {
        $options = [];
        foreach ($this->toOptionArray() as $values) {
            $options[$values['value']] = __($values['label']);
        }
        return $options;
    }
122166
public function getRenderTemplates($suffix = '')
    {
        $classes = ClassInfo::ancestry($this->ClassName);
        $classes[static::class] = static::class;
        $classes = array_reverse($classes);
        $templates = [];

        foreach ($classes as $key => $class) {
            if ($class == BaseElement::class) {
                continue;
            }

            if ($class == DataObject::class) {
                break;
            }

            if ($style = $this->Style) {
                $templates[$class][] = $class . $suffix . '_'. $this->getAreaRelationName() . '_' . $style;
                $templates[$class][] = $class . $suffix . '_' . $style;
            }
            $templates[$class][] = $class . $suffix . '_'. $this->getAreaRelationName();
            $templates[$class][] = $class . $suffix;
        }

        $this->extend('updateRenderTemplates', $templates, $suffix);

        $templateFlat = [];
        foreach ($templates as $class => $variations) {
            $templateFlat = array_merge($templateFlat, $variations);
        }

        return $templateFlat;
    }
68251
protected function className($suffix = '') {
		$exp = explode('\\', $this->getClass());

		return (!empty($suffix) &&
			substr($exp[count($exp) - 1], (strlen($exp[count($exp) - 1]) - strlen($suffix))) === $suffix) ?
			substr($exp[count($exp) - 1], 0, (strlen($exp[count($exp) - 1]) - strlen($suffix))) :
			$exp[count($exp) - 1];
	}
683794
public function getNewPath($suffix = '')
    {
        $result = $this->getPath().'/'.$this->uniqueCounter.(string) $suffix;
        ++$this->uniqueCounter;

        return $result;
    }
253860
public function getBasename($suffix = null)
    {
        if (is_null($suffix)) {
            return parent::getBasename();
        }

        return str_replace('.' . $this->getExtension(), '.' . trim($suffix, '.'), parent::getFilename());
    }
1047326
protected function prepareParameters(array $params, $suffix = '')
    {
        $parameters = [
            'names' => [],
            'values' => [],
            'types' => [],
        ];

        foreach ($params as $name => $info) {
            $name = $name.$suffix;

            $value = null;
            if (isset($info['value'])) {
                $value = $info['value'];
            }

            $type = 'string';
            if (array_key_exists('type', $info)) {
                $type = $info['type'];
            }

            $parameters['names'][] = ":$name";
            $parameters['values'][$name] = $value;
            $parameters['types'][$name] = $type;
        }

        return $parameters;
    }
259063
protected function getMagentoOptions(array $options)
    {
        $result = array();
        foreach ($options as $value => $label) {
            $result[] = array(
                'value' => $value,
                'label' => $label,
            );
        }
        return $result;
    }
388009
public function getMarkersAsString($options){
        $markers = '';

        foreach ($options['markers'] as $marker) {
            $markers .= $marker['lat'] . ',' . $marker['lng'] . '|';
        }

        return $markers ? substr($markers, 0, -1) : '';
    }
1314020
public function getBasenames(Finder $finder, $suffix = ''): array
    {
        $names = [];

        foreach ($finder as $splFileInfo) {
            /** @var \SplFileInfo $splFileInfo */
            $names[] = $splFileInfo->getBasename($suffix);
        }

        sort($names);

        return $names;
    }
53598
public function getFormOptions($options = []) {
		if (empty($options) || !is_array($options)) {
			$options = [];
		}

		$optionsDefault = $this->_getOptionsForElem('form');
		$result = $optionsDefault + $options;

		return $result;
	}
442372
public static function selectOptions($optionsArray, $selected = NULL) {
    $ret = array();
    foreach ($optionsArray as $value => $label) {
      if ($label instanceof HTMLTag) {
        $tag = $label;
        
        if ($tag->getAttribute('value') === $selected)
          $tag->setAttribute('selected','selected');

      } else {
        /* Interface Form Item */
        if($label instanceof \Psc\Form\Item) {
          $item = $label;
          $label = $item->getFormLabel();
          $value = $item->getFormValue();
        }
        
        $tag = static::tag('option',self::esc((string) $label),array('value'=>$value));
        if ($value === $selected)
          $tag->setAttribute('selected','selected');
      }
      
      $ret[] = $tag;
    }
    return $ret;
  }
316893
public function toAttr($prefix='', $suffix='') {
        $attrs = array();
        if ($this->width !== FALSE) {
            $attrs[] = 'width="'.addslashes($this->width).'"';
        }
        if ($this->height !== FALSE) {
            $attrs[] = 'height="'.addslashes($this->height).'"';
        }
        return $prefix.implode(' ', $attrs).$suffix;
    }
388249
protected function buildOptionsList(array $options): string
	{
		$output = '';

		foreach($options as $key => $option)
		{
			$output .= ($key + 1) . ') ' . $option . PHP_EOL;
		}

		return $output . '> ';
	}