Create a select box.

@param $key
@param $params

@return $this
764822
protected function select($key, $params)
    {
        $select = $selectValue = '';
        $options = $params['options'];
        unset($params['options']);

        $selected = null;
        if (isset($params['selected'])) {
            $selected = $params['selected'];
            unset($params['selected']);
        }

        list($elClass, $params) = $this->highlightErrorElement($key, $params);

        $select .= '<select'." name='".$key."' ".$this->attributes($params).' '.$elClass.'>'.PHP_EOL;

        /*
         | Build select box options and return as string
         |
         */
        $select .= $this->getSelectOptions($options, $selected);
        $select .= '</select>'.PHP_EOL;

        $this->elements[static::$formHolder[static::$formName]][$key] = $select;

        return $this;
    }
1287304
public function select(array $keys)
    {
        $list = [];
        foreach ($keys as $key) {
            if (isset($this->entries[$key])) {
                $list[$key] = $this->entries[$key];
            }
        }

        return $this->createFrom($list);
    }
1121600
public static function getRequired(
        array $params,
        string $key,
        $context = null
    ) {
        self::assertHas($params, $key, $context);

        return $params[$key];
    }
842094
public static function select($params = array()) {

        if( !is_array($params) )
        {
            throw new \InvalidArgumentException("Arguments is not a Array". print_r($params, true));
        }

        $o = "<select";
        $o .= (isset($params['id'])) ? " id='{$params['id']}'" : '';
        $o .= (isset($params['name'])) ? " name='{$params['name']}'" : '';
        $o .= (isset($params['class'])) ? " class='{$params['class']}'" : '';
        $o .= (isset($params['onclick'])) ? " onclick='{$params['onclick']}'" : '';
        $o .= (isset($params['width'])) ? " style='width:{$params['width']}px;'" : '';
        $o .= (isset($params['required'])) ? " required='required'" : '';
        $o .= (isset($params['disabled'])) ? " disabled='{$params['disabled']}'" : '';
        $o .= (isset($params['style'])) ? " style='{$params['style']}'" : '';
        $o .= ">\n";
        $o .= "<option value=''>Select</option>\n";
        if (isset($params['data']) && is_array($params['data'])) {
            foreach ($params['data'] as $k => $v) {
                if (isset($params['value']) && $params['value'] == $k) {
                    $o .= "<option value='{$k}' selected='selected'>{$v}</option>\n";
                } else {
                    $o .= "<option value='{$k}'>{$v}</option>\n";
                }
            }
            throw new \InvalidArgumentException("Arguments is not valid ". print_r($params, true));

        }
        $o .= "</select>\n";
        return $o;
    }
611051
public function params(...$params): self
    {
        $this->params = $params;
        array_push($this->params, $this->event);
        return $this;
    }
623086
public function setParam($key, $value)
    {
        if(!isset($this->params[$key]) || $this->params[$key] === []) {
            $this->params[$key] = $value;
        }
        else {
            $this->params[$key] = array_merge($this->params[$key], [$value]);
        }
        return $this;
    }
1271855
function delete($key) {
        parent::delete($key);
        if($this !== $this->client->users) {
            $this->client->users->delete($key);
        }
        
        return $this;
    }
616716
public function createBinding(String $key, $queryPart, $params=[], $expr='', $with='', $addValue=true)
	{
		if (!array_key_exists($key, $this->bindings)) {
			return false;
		}

		if ($key == 'sql') {
			return $queryPart;
		}

		if ($addValue == true) {
			$this->bindings[$key] = $queryPart;
		}

		return $this->$key($queryPart, $params, $expr, $with, $addValue);
	}
297427
public function createOrUpdate($key, array $input, array $queryParams = [])
    {
        $response = $this->client->put($this->uri($key), [
            RequestOptions::JSON => ['setting' => $input],
            'query' => $queryParams,
        ]);

        return $this->handleResponse($response);
    }
1321710
public function setKey($key)
    {
        $this->key = $key;

        // Initialize if we're the first instance.
        if (! session()->has('bzarzuela.filters')) {
            session(['bzarzuela.filters' => [$key => []]]);
        }

        return $this;
    }
708907
public function setParams($params)
    {
        foreach ($params as $name => $value) {
            $this->setParam($name, $value);
        }
        return $this;
    }
1260808
public function bind(array $params)
    {
        foreach ($params as $key => $value) {
            $this->addParam($value, $key);
        }
        return $this;
    }
153760
public function setupParams($params = [])
    {
        if (is_array($params)) {
            $this->params = array_merge($this->params, $params);
        }
        return $this;
    }
562926
public function select($params/*, ...*/)
    {
        $rel = $this->currentOrClone();
        
        $params = func_get_args();
        if (is_array($params[0])) {
            $params = array_shift($params);
        }
        $rel->select->columns($params);
        return $rel;
    }
960872
private function selectQuery($sql, array $params = array())
    {
        $stmt = $this->getConnection()->prepare($sql);
        $stmt->execute($params);

        return $stmt->fetchAll(PDO::FETCH_ASSOC);
    }
1046439
public function addSelectOption($key, $val)
    {
        if (!is_string($key)) {
            throw new InvalidArgumentException(
                'Setting key must be a string.'
            );
        }

        // Make sure default options are loaded.
        if ($this->selectOptions === null) {
            $this->selectOptions();
        }

        $this->selectOptions[$key] = $val;

        return $this;
    }
1138843
public static function getAndRemoveRequired(
        array &$params,
        string $key,
        $context = null
    ) {
        $value = self::getRequired(
            $params,
            $key,
            $context
        );

        self::remove(
            $params,
            $key
        );

        return $value;
    }