Returns a group of Semantic buttons
@see http://phpmv-ui.kobject.net/index/direct/main/50
@see http://semantic-ui.com/elements/button.html#buttons
@param string $identifier
@param array $elements
@param boolean $asIcons
@return HtmlButtonGroups
962413
public function htmlButtonGroups($identifier, $elements=array(), $asIcons=false) {
		return $this->addHtmlComponent(new HtmlButtonGroups($identifier, $elements, $asIcons));
	}
1144993
public function tryGetByIdentifier(Identifier $identifier)
    {
        $mapId     = $identifier->getSerialized();
        $className = $identifier->class->getName();

        if (!isset($this->identityMap[$className][$mapId])) {
            return false;
        }

        return $this->identityMap[$className][$mapId];
    }
182547
public function addButtons(array $buttons): self
    {
        foreach ($buttons as $button) {
            if ($button instanceof ElementButton) {
                $this->buttons[] = $button->toArray();
            }
        }

        return $this;
    }
708209
public function getDefinitionByIdentifier($identifier)
    {
        foreach($this->groups as $group) {
            foreach($group->getDefinitions() as $definition) {
                if ($definition->getIdentifier() === $identifier) {
                    return $definition;
                }
            }
        }
        return null;
    }
92470
public function getIdentifierNamespaces($identifier)
    {
        return isset($this->__identifiers[$identifier]) ?  $this->__identifiers[$identifier] : false;
    }
770660
public static function buttonGroup($button, $links)
    {
        foreach ($links as $key => $link) {
            $links[$key] = Html::beginTag('li')
                    . Html::a($link[0], $link[1], $link[2])
                . Html::endTag('li');
        }

        return Html::beginTag('div', ['class' => 'btn-group'])
                . Html::button($button[0], array_merge([
                    'type'=>"button",
                    'class'=>"btn btn-default dropdown-toggle",
                    'data-toggle'=>"dropdown",
                    'aria-haspopup'=>"true",
                    'aria-expanded'=>"false"
                ], $button[1]))
                . Html::beginTag('ul', ['class' => 'dropdown-menu'])
                    . implode('', $links)
                . Html::endTag('ul')
            . Html::endTag('div');
    }
394970
public function getByIdentifier($identifier)
    {
        if (isset($this->nodesByIdentifier[$identifier])) {
            return $this->nodesByIdentifier[$identifier];
        }

        return false;
    }
102079
public static function buttonGroup(array $buttons, $htmlOptions = array())
    {
        if (!empty($buttons)) {
            self::addCssClass('btn-group', $htmlOptions);
            if (TbArray::popValue('vertical', $htmlOptions, false)) {
                self::addCssClass('btn-group-vertical', $htmlOptions);
            }
            $toggle = TbArray::popValue('toggle', $htmlOptions);
            if (!empty($toggle)) {
                $htmlOptions['data-toggle'] = 'buttons-' . $toggle;
            }
            $parentOptions = array(
                'color' => TbArray::popValue('color', $htmlOptions),
                'size' => TbArray::popValue('size', $htmlOptions),
                'disabled' => TbArray::popValue('disabled', $htmlOptions)
            );
            $output = self::openTag('div', $htmlOptions);
            foreach ($buttons as $buttonOptions) {
                if (isset($buttonOptions['visible']) && $buttonOptions['visible'] === false) {
                    continue;
                }
                // todo: consider removing the support for htmlOptions.
                $options = TbArray::popValue('htmlOptions', $buttonOptions, array());
                if (!empty($options)) {
                    $buttonOptions = TbArray::merge($options, $buttonOptions);
                }
                $buttonLabel = TbArray::popValue('label', $buttonOptions, '');
                $buttonOptions = TbArray::copyValues(array('color', 'size', 'disabled'), $parentOptions, $buttonOptions);
                $items = TbArray::popValue('items', $buttonOptions, array());
                if (!empty($items)) {
                    $output .= self::buttonDropdown($buttonLabel, $items, $buttonOptions);
                } else {
					$type = TbArray::popValue('type', $buttonOptions, self::BUTTON_TYPE_LINKBUTTON);
					$output .= self::btn($type, $buttonLabel, $buttonOptions);
                }
            }
            $output .= '</div>';
            return $output;
        }
        return '';
    }
692884
public function setByIdentifier($identifier, NodeInterface $node = null)
    {
        $this->nodesByIdentifier[$identifier] = $node;
        if ($node !== null) {
            $this->nodesByPath[$node->getPath()] = $node;
        }
    }
564541
public function get_method($identifier)
    {
    	$key = $this->_key($identifier);
    	$item = $this->get($key);

    	return ($item == false) ?
    		array('status' => false, 'data' => null) :
    		array('status' => true, 'data' => $item);
    }
675770
public function htmlModal($identifier, $header="", $content="", $actions=array()) {
		return $this->addHtmlComponent(new HtmlModal($identifier, $header,$content,$actions));
	}
766901
public function htmlLabel($identifier, $content="", $icon=NULL,$tagName="div") {
		return $this->addHtmlComponent(new HtmlLabel($identifier, $content,$icon, $tagName));
	}
795207
public function buildForm($identifier = null)
	{
		$this->setFormMapper(new FormMapper);
		$this->configureForm($this->getFormMapper());

		$this->setFormBuilder(new FormBuilder($this->getFormMapper()));
		$this->getFormBuilder()
			->setModel($this->getModel())
			->setIdentifier($identifier)
			->setContext($identifier === null ? FormBuilder::CONTEXT_CREATE : FormBuilder::CONTEXT_EDIT)
			->build();

		return $this;
	}
952483
public function loadContentTypeGroupsByIdentifiers(array $identifiers)
    {
        $contentTypeGroups = array_map(
            function ($identifier) {
                try {
                    return $this->contentTypeService->loadContentTypeGroupByIdentifier($identifier);
                } catch (NotFoundException $notFoundException) {
                    return $this->createContentTypeGroupByIdentifier($identifier);
                }
            },
            $identifiers
        );

        return $contentTypeGroups;
    }
1267086
public function find($identifier, array $columns = ['*'])
    {
        return $this->mediator->transform($this->mediator(func_get_args()))->first();
    }
592411
public static function getComponentWithIdentifier(string $identifier)
    {
        $components = self::getComponents();
        foreach ($components as $component) {
            if (empty($component->getIdentifier())) {
                continue;
            }
            
            if ($component->getIdentifier() == $identifier) {
                return $component;
            }
        }
        
        return null;
    }
45994
protected function findTagsByIdentifier(string $identifier): array
    {
        $success = false;
        $tags = apcu_fetch($this->identifierPrefix . 'ident_' . $identifier, $success);
        return ($success ? (array)$tags : []);
    }