Return a new Bootstrap Html listGroup
@param string $identifier
@param array $items array of items to add
@param string $tagName container tagName
@return HtmlListgroup
161988
public function htmlListgroup($identifier,$items=array(),$tagName="ul"){
		$listGroup=new HtmlListgroup($identifier,$tagName);
		$listGroup->addItems($items);
		return $this->addHtmlComponent($listGroup);
	}
545312
public static function getTagNumber($identifier)
    {
        $firstOctet = self::makeNumeric($identifier);
        $tagNumber = $firstOctet & self::LONG_FORM;

        if ($tagNumber < self::LONG_FORM) {
            return $tagNumber;
        }

        if (is_numeric($identifier)) {
            $identifier = chr($identifier);
        }
        return Base128::decode(substr($identifier, 1));
    }
9354
public static function select( $items, $options = [] ) {
		$options['tag'] = 'select';
		$options['item'] = function ( $item, $index ) {
			$itemOptions = [];
			if ( is_array( $item ) ) {
				$label = $item['label'];
                $itemOptions['value'] = $item['value'];
				if ( ! empty( $item['options'] ) && ArrayHelper::isAssociative( $item['options'] ) ) {
                    $itemOptions = array_merge( $itemOptions, $item['options'] );
                }
			} else {
				$label = $item;
				$itemOptions['value'] = $item;
			}

			return static::tag('option', $label, $itemOptions );
		};

		return static::ul( $items, $options );
	}
426368
private function getNextItem(Tag $item, $items)
    {
        $currentItem = $items[0];

        while ($currentItem !== null and $currentItem !== $item) {
            $currentItem = next($items);
        }

        $next = next($items);

        return $next !== false ? $next : null;
    }
277539
public function htmlDropdown($identifier, $value="", $items=array(), $cssStyle=NULL, $size=NULL) {
		return $this->addHtmlComponent(new HtmlDropdown($identifier, $value, $items, $cssStyle, $size));
	}
898357
public static function navList($items, $htmlOptions = array())
    {
        foreach ($items as $i => $itemOptions) {
            if (is_string($itemOptions)) {
                continue;
            }
            if (!isset($itemOptions['url']) && !isset($itemOptions['items'])) {
                $label = TbArray::popValue('label', $itemOptions, '');
                $items[$i] = self::menuHeader($label, $itemOptions);
            }
        }
        return self::nav(self::NAV_TYPE_LIST, $items, $htmlOptions);
    }
656967
public function htmlSplitbutton($identifier,$value="", $items=array(), $cssStyle="btn-default", $onClick=NULL) {
		return $this->addHtmlComponent(new HtmlSplitbutton($identifier, $value, $items, $cssStyle,$onClick));
	}
333453
public static function icon($identifier, $icon) {
		$result=new HtmlButton($identifier);
		$result->asIcon($icon);
		return $result;
	}
1090097
public function build(string $identifier, callable $items): Menu
    {
        $builder = new Builder($identifier);

        $items($builder);

        if (isset($this->menus[$identifier])) {
            $this->menus[$identifier] = array_merge($this->menus[$identifier], $builder->getMenu());

            return $this;
        }

        $this->menus[$identifier] = $builder->getMenu();

        return $this;
    }
35245
public function loadGroupByIdentifier($identifier)
    {
        $groups = $this->mapper->extractGroupsFromRows(
            $this->contentTypeGateway->loadGroupDataByIdentifier($identifier)
        );

        if (count($groups) !== 1) {
            throw new Exception\TypeGroupNotFound($identifier);
        }

        return $groups[0];
    }
199510
public static function forSource(TagSource $source, SS_List $items = null)
    {
        // Create Data List:
        
        $tags = DataList::create(static::class);
        
        // Filter Tagged Items:
        
        if ($items instanceof DataList) {
            
            if (!$items->exists()) {
                return ArrayList::create();
            }
            
            if ($belongs = Config::inst()->get(static::class, 'belongs_many_many')) {
                
                // Filter Tags Associated with Items:
                
                if ($component = array_search($items->dataClass(), $belongs)) {
                    $tags = $tags->filter(sprintf('%s.ID', $component), $items->column('ID'));
                }
                
            }
            
        }
        
        // Convert List to Array:
        
        $tags = $tags->toArray();
        
        // Associate Tags with Source:
        
        foreach ($tags as $tag) {
            $tag->setSource($source);
        }
        
        // Answer Array List:
        
        return ArrayList::create($tags);
    }
838679
public function addSelectList(string $name, array $items = []): void
    {
        $options = $this->formOptions['fields'][$name];
        $wrapper = $this->createWrapper();
        $label = '';

        if (isset($options['label']['text'])) {
            $label = $this->createLabel($options['label']['text'], $name);

            unset($options['label']['text']);
        }

        $list = HtmlTag::createElement('select')
            ->set('id', $name)
            ->set('name', $name);

        $caption = '';

        if (isset($options['caption']['text'])) {
            $list->set('aria-describedby', $name . '_caption');
            $caption = $this->createCaption($options['caption']['text'], $name);

            unset($options['caption']['text']);
        }

        foreach ($items as $value => $text) {
            $item[] = $list->addElement('option')
                ->set('value', $value)
                ->text($text);
        }

        $elements = [
            'wrapper' => $wrapper,
            'label'   => $label,
            'list'    => $list,
            'item'    => $item ?? [],
            'caption' => $caption
        ];

        foreach ($elements as $name => $element) {
            $$name = $this->assignOptionsToElement($options, $name, $element);
        }

        $wrapper->addElement($label);
        $wrapper->addElement($list);
        $wrapper->addElement($caption);

        echo $wrapper;
    }
199752
public function htmlNavbar($identifier, $brand="Brand", $brandHref="#") {
		return $this->addHtmlComponent(new HtmlNavbar($identifier, $brand, $brandHref));
	}
158379
public function getCollection(string $identifier): Collection
    {
        if (!$this->hasCollection($identifier)) {
            throw BlockException::noCollection($identifier);
        }

        return $this->collections->get($identifier);
    }
300091
public function getContentTypesByGroup($identifier)
    {
        $contentTypesCollection = array();

        if ($contentTypeGroupIdentifier = $identifier) {
            $contentTypeGroup = $this->contentTypeService->loadContentTypeGroupByIdentifier($contentTypeGroupIdentifier);
            $contentTypesCollection = $this->contentTypeService->loadContentTypes($contentTypeGroup);
        }

        return $contentTypesCollection;
    }
457940
public static function dropdown($identifier,$value,$items=[],$asCombo=false,$icon=null){
		$result=new HtmlButtonGroups($identifier,[$value]);
		$dd=$result->addDropdown($items,$asCombo);
		if(isset($icon) && $dd instanceof HtmlDropdown)
			$dd->setIcon($icon);
		return $result;
	}
289488
public function add($item, array $tags = [])
    {
        if ($item instanceof Process) {
            return $this->add(new ProcessRun($item, $tags));
        }
        if (!$item instanceof RunInterface) {
            throw new InvalidArgumentException('item must implement `RunInterface`');
        }

        parent::add($item);
        $status = 'waiting';
        if ($item->isRunning()) {
            $status = 'running';
            $this->running[] = $item;
        } elseif ($item->hasStarted()) {
            $status = 'finished';
            $this->complete[] = $item;
        } else {
            $this->waiting[] = $item;
        }

        $item->addListener(RunEvent::STARTED, [$this, 'onRunStarted']);
        $item->addListener(RunEvent::COMPLETED, [$this, 'onRunCompleted']);
        $item->addListener(RunEvent::FAILED, [$this, 'onRunFailed']);

        $this->dispatch(PoolRunEvent::POOL_RUN_ADDED, new PoolRunEvent($this, $item));

        if ($status != 'waiting' && $this->state != static::STATE_RUNNING) {
            $this->setStarted();
            $this->dispatch(RunEvent::STARTED, new RunEvent($this));
        }
        if ($status == 'finished' && $this->state != static::STATE_NOT_RUNNING) {
            $this->setFinished();
            $this->dispatch(RunEvent::COMPLETED, new RunEvent($this));
        }

        return $this;
    }