Returns the name to display on course/overview page, formatted and passed through filters

if $options['context'] is not specified, the module context is used

@param array|stdClass $options formatting options, see {@link format_string()}
@return string
164948
public function get_formatted_name($options = array()) {
        global $CFG;
        $options = (array)$options;
        if (!isset($options['context'])) {
            $options['context'] = $this->get_context();
        }
        // Improve filter performance by preloading filter setttings for all
        // activities on the course (this does nothing if called multiple
        // times).
        if (!empty($CFG->filterall)) {
            filter_preload_activities($this->get_modinfo());
        }
        return format_string($this->get_name(), true,  $options);
    }
941385
public function renderTitle(array $options = [])
    {
        $options = $options + $this->options;

        $response = (count($this->breadcrumbs) <= 1)
            ? $options['site_full_name']
            : $options['site_short_name'];

        foreach ($this->breadcrumbs->all() as $key => $value) {
            if ($key == 0) {
                continue;
            }

            $response = $value['title'].' '.$options['delimiter'].' '.$response;
        }

        return $response;
    }
846513
protected function getUrl(array $options): string
    {
        $urlOptions = [];
        $this->setOriginAndDestinationOption($urlOptions, $options);
        $this->setViaOption($urlOptions, $options);
        $this->setDateOption($urlOptions, $options);

        $urlOptions = array_merge($urlOptions, $options);

        return sprintf('trip?%s&format=json', http_build_query($urlOptions));
    }
1081721
private function setFormFieldLabel($name, $options)
    {
        if (isset($options['label']) && $options['label'] != false) {
            $label = isset($options['label']) ? $options['label'] : $this->formatFieldLabel($name);

            return FormFacade::label($name, $label, ['class' => 'form-label']).'&nbsp;';
        } elseif (!isset($options['label'])) {
            return FormFacade::label($name, $this->formatFieldLabel($name), ['class' => 'form-label']).'&nbsp;';
        }
    }
1037265
protected function getCliDispatchScriptFileName(array $options = [])
    {
        $webDirectory = isset($options['webDirectory']) ? trim($options['webDirectory'], '\\/') : '';
        return $webDirectory !== '' ? sprintf('%s/typo3/cli_dispatch.phpsh', $webDirectory) : 'typo3/cli_dispatch.phpsh';
    }
1021137
public function getName(array $options = array())
    {
        $result = "";
        foreach ($this->getUnitedTypes() as $type)
        {
            if ($result !== "")
                $result .= "|";
            $result .= $type->getName();
        }
        return $result;
    }
98897
static function formatOptions( $options, $default = false ) {
		$data = '';

		foreach( $options as $label => $value ){
			if( is_array( $value ) ) {
				$contents = self::formatOptions( $value, $default );
				$data .= self::tags( 'optgroup', array( 'label' => $label ), $contents ) . "\n";
			} else {
				$data .= self::option( $label, $value, $value === $default ) . "\n";
			}
		}

		return $data;
	}
424971
public function get_coursename() {
        return format_string($this->course->shortname, true, array(
            'context' => \context_course::instance($this->course->id),
        ));
    }
212218
private function formatOption(Option $option) : string
    {
        $text = "[--{$option->getName()}";

        if ($option->valueIsOptional()) {
            $text .= '=' . $option->getDefaultValue();
        }

        if ($option->getShortName() !== null) {
            $text .= "|-{$option->getShortName()}";
        }

        $text .= ']';

        return $text;
    }
675797
public function getInputOptionSynopsis(input\Option $definition, array $options = null)
    {
        $shortcut = $definition->getShortcut() ? sprintf('-%s|', $definition->getShortcut()) : '';

        if ($value = $definition->getValue()) {
            $format = $value->is(input\Value::REQUIRED) ? '%s--%s="..."' : '%s--%s[="..."]';
        } else {
            $format = '%s--%s';
        }

        return sprintf('['.$format.']', $shortcut, $definition->getName());
    }
1186696
private function getId($options)
    {
        $id = '';
        if (!isset($options['id'])) {
            $id = $options['name'];
        } else {
            $id = $options['id'];
        }

        return $id;
    }
821671
public function get_context_name($withprefix = true, $short = false) {
        global $DB;

        $name = '';
        if ($user = $DB->get_record('user', array('id'=>$this->_instanceid, 'deleted'=>0))) {
            if ($withprefix){
                $name = get_string('user').': ';
            }
            $name .= fullname($user);
        }
        return $name;
    }
511705
public static function getInstance($name = 'none', $options = array())
	{
		$filter = new InputFilter;
		$name   = strtolower($filter->clean($name, 'word'));

		if (empty(self::$instances[$name]))
		{
			$class = '\\Joomla\\Session\\Storage\\' . ucfirst($name);

			if (!class_exists($class))
			{
				$path = __DIR__ . '/storage/' . $name . '.php';

				if (file_exists($path))
				{
					require_once $path;
				}
				else
				{
					// No attempt to die gracefully here, as it tries to close the non-existing session
					exit('Unable to load session storage class: ' . $name);
				}
			}

			self::$instances[$name] = new $class($options);
		}

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

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

        return $prefix.$this->name;
    }
1018386
public function render(array $options = []): string
    {
        $html = $this->format['menuStart'];
        $html .= !empty($options['title']) ? $options['title'] : '';

        /**
         * @var MenuItemInterface $menuItem
         */
        foreach ($this->menu->getMenuItems() as $menuItem) {
            if ($menuItem->isEnabled()) {
                $html .= $this->renderMenuItem($menuItem);
            }
        }
        $html .= $this->format['menuEnd'];

        return $html;
    }
306790
protected function getBranchName($options) {
    if ($options['branch']) {
      $this->say("Branch is set to <comment>{$options['branch']}</comment>.");
      return $options['branch'];
    }
    else {
      return $this->askDefault('Enter the branch name for the deployment artifact', $this->getDefaultBranchName());
    }
  }
105256
public function label( $name, $value = null, $options = [] ) {
		$this->labels[] = $name;

		$value = $this->format_label( $name, $value );

		return $this->to_html_string( '<label for="' . $name . '"' . $this->attributes( $options ) . '>' . $value . '</label>' );
	}