Create link

@param array $options
@return string
428687
public function createLink(array $options)
    {
        $str = ' ';
        foreach ($options as $key => $value) {
            if (($str !== ' ')) {
                $str .= ' '.$key.'="'.$value.'"';
            } else {
                $str .= $key.'="'.$value.'"';
            }
        }

        $html = '<link' . $str;
        if ($this->doctype == self::DOCTYPE_XHTML1_0_FRAMESET ||
                $this->doctype == self::DOCTYPE_XHTML1_0_STRICT ||
                $this->doctype == self::DOCTYPE_XHTML1_0_TRANSITIONAL) {
            $html .= '/>';
        } else {
            $html .= '>';
        }

        return $html;
    }
581782
public function indexButton($options = [])
    {
        $_options = [
            'before' => 'All ',
            'after' => '',
        ];

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

        $string = $options['before'] . h(Inflector::singularize($this->_type['alias'])) . $options['after'];
        return $this->Html->link($string, ['action' => 'add', 'type' => $this->_type['slug']]);
    }
993958
protected function getUrl($options)
    {
        foreach ($options as $key => $value) {
            $$key = $value;
        }

        $secure = null;
        if (isset($options['secure'])) {
            $secure = true === $options['secure'] ? true : false;
        }

        if (is_array($url)) {
            if (self::isAbs($url[0])) {
                return $url[0];
            }

            return URL::to($prefix.'/'.$url[0], array_slice($url, 1), $secure);
        }

        if (self::isAbs($url)) {
            return $url;
        }

        return URL::to($prefix.'/'.$url, [], $secure);
    }
906919
public static function generate($options)
    {
        if (isset($options['keywords'])) {
            $options['keywords'] = static::printWords($options['keywords']);
        }

        return sprintf(
            static::TEMPLATE,
            $options['name'],
            $options['class'],
            $options['link'],
            $options['keywords']
        );
    }
924814
public function create(array $options)
    {
        $entityClass = $this->getClassName($options['entity-table']);
        $closureClass = $this->getClassName($options['closure-table']);
        $useInnoDB = $options['use-innodb'];
        $stubPrefix = $useInnoDB ? '-innodb' : '';

        $path = $this->getPath($options['entity-table'], $options['migrations-path']);
        $stub = $this->getStub('migration' . $stubPrefix, 'migrations');

        $this->filesystem->put(
            $path,
            $this->parseStub($stub, [
            'entity_table' => $options['entity-table'],
            'entity_class' => $entityClass,
            'closure_table' => $options['closure-table'],
            'closure_class' => $closureClass,
            ])
        );

        return [$path];
    }
1026657
public function create(array $options = [])
    {
        $options = $this->resolveOptions($options);

        if (!$options[self::OPTION_ENABLE]) {
            return new NullProfiler();
        }

        if ($options[self::OPTION_ENVIRONMENT] !== null) {
            Profiler::$environment = $options[self::OPTION_ENVIRONMENT];
        }

        $profiler = new Profiler();

        switch ($options[self::OPTION_DATASOURCE_CLASS]) {
            default:
            case File::class:
                $datasource = new File($options[self::OPTION_DATASOURCE_PROFILES_FOLDER]);
                break;
            case Memory::class:
                $datasource = new Memory();
        }

        $profiler->setDataSource($datasource);
        $profiler->registerCollectorClasses($options[self::OPTION_COLLECTORS]);

        $dispatcher = $profiler->getContext()->getProcess()->getDispatcher();
        $className = $options['logger'];
        $logger = new $className();
        $logger->setDispatcher($dispatcher);
        $profiler->setLogger($logger);

        $profiler->setTimeline(new TimelineComponent($dispatcher));

        return $profiler;
    }
591415
public function link($content, $url = [], array $options = []) {
        /* @var $url_helper UrlHelper */
        $url_helper = $this->url;
        
        $cfg = [
            'href' => is_array($url) ? (
                key_exists('push', $url) ? $url_helper->push($url['push']) : (
                key_exists('add', $url) || key_exists('remove', $url) ? 
                    $url_helper->modify(
                        key_exists('add', $url) ? $url['add'] : [],
                        key_exists('remove', $url) ? $url['remove'] : []
                    ) : (
                        key_exists('generate', $url) ? $url_helper->build($url, Arr::trim($url, 'generate')) :
                            (key_exists('mailto', $url) ? 'mailto:' . $url['mailto'] : $url_helper->build($url))
                    )
            )) : ( $url_helper->routeExist($url) ? $url_helper->build([], $url) : $url )
        ] + $options;
        return '<a ' . Str::htmlserialize($cfg) . ' >' . $content . '</a>';
    }
678509
public function createLoginForm($options = array())
		{

			// Default options
			$options = array_merge(array(
				"action" => $this->loginUri,
				"method" => "post"
			), $options);

			// Create it!
			$form = new Form($options);

			// Done.
			return $form;

		}
388249
protected function buildOptionsList(array $options): string
	{
		$output = '';

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

		return $output . '> ';
	}
990940
public static function create(array $options): Token
    {
        $token = new self($options);
        $token->token = $token->generate();

        return $token;
    }
947415
protected function configureURL(array $options)
    {
        $url = $this->getEndPointUrl();
        if ($this->requiresOptions()) {
            $urlArr = explode("/",$url);
            $optional = FALSE;
            $optionNum = 0;
            $keys = array_keys($options);
            sort($keys);
            foreach($keys as $key){
                if (is_numeric($key)){
                    $optionNum = $key;
                    break;
                }
            }
            foreach($urlArr as $key => $urlPart){
                $replace = NULL;
                if (strpos($urlPart,static::$_URL_VAR_CHARACTER) !== FALSE){
                    if (strpos($urlPart,':') !== FALSE){
                        $optional = TRUE;
                        $replace = '';
                    }
                    $opt = str_replace(array(static::$_URL_VAR_CHARACTER,':'),'',$urlPart);
                    if (isset($options[$opt])){
                        $replace = $options[$opt];
                    }
                    if (isset($options[$optionNum]) && ($replace == '' || $replace == NULL)){
                        $replace = $options[$optionNum];
                        $optionNum = $optionNum+1;
                    }
                    if ($optional && $replace == ''){
                        $urlArr = array_slice($urlArr,0,$key);
                        break;
                    }
                    if ($replace !== NULL){
                        $urlArr[$key] = $replace;
                    }
                }
            }
            $url = implode("/",$urlArr);
            $url = rtrim($url,"/");
        }
        return $url;
    }
35489
private function createNode($name, $options)
    {
        $node = $name . ' [';
        foreach ($options as $key => $value) {
            $node .= $key . '=' . $value . ' ';
        }
        $node .= "]\n";

        return $node;
    }
345224
public function createHeaderNode(array $options = array())
    {
        $node = new MenuNode();
        $node->type = MenuNode::TYPE_HEADER;

        if (isset($options['label'])) {
            $node->label = $options['label'];
        }

        if (isset($options['translate_label'])) {
            $node->translateLabel = $options['translate_label'];
        }

        if (isset($options['roles'])) {
            $node->roles = ArrayUtils::to_array($options['roles']);
        }

        return $node;
    }
1155693
public function create($options = NULL) {
        return $this->request("POST", self::URL_TOKENS, $api_key = $this->culqi->api_key, $options, true);
    }
580802
public function link($title, $url = null, array $options = [])
    {
        $options = $this->addClass($options, $this->_class(__FUNCTION__));
        $options = Hash::merge([
            'escapeTitle' => false,
            'clear'       => false,
            'label'       => $title,
        ], $options);

        $isClear = (bool) $options['clear'];
        unset($options['clear']);

        $options = $this->_setTitleAttr($title, $options);

        //  Set title in html tag.
        if ($this->_isEscapeTitle($title, $isClear, $options)) {
            $title = $this->tag('span', $title, ['class' => $this->_class(__FUNCTION__) . '-title']);
        }

        $options = $this->_getBtnClass($options);
        $options = $this->_getToolTipAttr($options);

        list($title, $options) = $this->_createIcon($this, $title, $options);
        unset($options['label']);

        return parent::link($title, $url, $options);
    }
109180
private function _createRoute( $options )
    {
        $url = $this->_di->getService( "url" );

        /**
         * All route uris should have the uri prefix
         */
        $options["uri"] = $url->getUriPrefix() . $options["uri"];

        if (isset($options["controller_action"]))
        {
            $controller_action_exploded = explode( "#", $options["controller_action"] );

            $options["controllerName"] = $controller_action_exploded[0];
            $options["actionName"]     = $controller_action_exploded[1];
        }

        // $uri            = $settings["uri"];
        //
        // $controllerName = $settings["controllerName"];
        //
        // $actionName     = $settings["actionName"];
        //
        // $params         = $settigns["params"];

        return new Route($options);
    }
481138
public function createUserMenu(array $options)
    {
        $menu = $this->factory->createItem('root');
        $menu->setLabel($this->token_storage->getToken()->getUser()->__toString());

        $event = new UserMenuCollectionEvent($menu);
        $this->dispatcher->dispatch(UserMenuCollectionEvent::NAME, $event);

        return $menu;
    }