Pushes the given values to either the black-or-white-list.

@param   array           &$list      Either $this->blacklist or $this->whitelist.
@param   string|array    $name       {@see self::blacklist()} or {@see self::whitelist()}
@return  $this
188977
protected function pushToList(array &$list, $name) : self
    {
        // Handle arrays (recursively).
        if (is_array($name)) {
            foreach ($name as $single) {
                $this->pushToList($list, $single);
            }
            return $this;
        }

        $list[] = $name;

        // Reset the applicable Delegates as we will need to recompile the list.
        $this->applicable = null;

        return $this;
    }
141228
public function select(
        $name,
        $list = [],
        $selected = null,
        array $selectAttributes = [],
        array $optionsAttributes = [],
        array $optgroupsAttributes = []
    ) {
        $this->type = 'select';

        // When building a select box the "value" attribute is really the selected one
        // so we will use that when checking the model or session for a value which
        // should provide a convenient method of re-populating the forms on post.
        $selected = $this->getValueAttribute($name, $selected);

        $selectAttributes['id'] = $this->getIdAttribute($name, $selectAttributes);

        if (! isset($selectAttributes['name'])) {
            $selectAttributes['name'] = $name;
        }

        // We will simply loop through the options and build an HTML value for each of
        // them until we have an array of HTML declarations. Then we will join them
        // all together into one single HTML element that can be put on the form.
        $html = [];

        if (isset($selectAttributes['placeholder'])) {
            $html[] = $this->placeholderOption($selectAttributes['placeholder'], $selected);
            unset($selectAttributes['placeholder']);
        }

        foreach ($list as $value => $display) {
            $optionAttributes = $optionsAttributes[$value] ?? [];
            $optgroupAttributes = $optgroupsAttributes[$value] ?? [];
            $html[] = $this->getSelectOption($display, $value, $selected, $optionAttributes, $optgroupAttributes);
        }

        // Once we have all of this HTML, we can join this into a single element after
        // formatting the attributes into an HTML "attributes" string, then we will
        // build out a final select statement, which will contain all the values.
        $selectAttributes = $this->html->attributes($selectAttributes);

        $list = implode('', $html);

        return $this->toHtmlString("<select{$selectAttributes}>{$list}</select>");
    }
1227674
public function select($name, $list = [], $selected = null, array $selectAttributes = [], array $optionsAttributes = [], array $optgroupsAttributes = [])
    {
        $selectAttributes = $this->appendClassToOptions('form-control', $selectAttributes);

        if ($this->hasErrors($name)) {
            $selectAttributes = $this->appendClassToOptions('is-invalid', $selectAttributes);
        }

        return parent::select($name, $list, $selected, $selectAttributes, $optionsAttributes, $optgroupsAttributes);
    }
1302588
public void setWhitelist(java.util.Collection<String> whitelist) {
        if (whitelist == null) {
            this.whitelist = null;
            return;
        }

        this.whitelist = new java.util.ArrayList<String>(whitelist);
    }
7919
public void put(String name,List list)
    {
        if (list==null || list.size()==0)
        {
            remove(name);
            return;
        }
        
        Object v=list.get(0);
        if (v!=null)
            put(name,v.toString());
        else
            remove(name);
        
        if (list.size()>1)
        {    
            java.util.Iterator iter = list.iterator();
            iter.next();
            while(iter.hasNext())
            {
                v=iter.next();
                if (v!=null)
                    add(name,v.toString());
            }
        }
    }
485093
public function push(string $name, string $handler)
    {
        if (! isset($this->handlers[$name])) {
            $this->handlers[$name] = [];
        }

        if (! in_array($handler, $this->handlers[$name])) {
            $this->handlers[$name][] = $handler;
        }
    }
940521
protected function filterList($list)
    {
        $conf = Configuration::getConfig(self::CONFIG_FILE_NAME);
        $disableWhitelisting
            = $conf->getBoolean(self::PROPNAME_DISABLE_WHITELISTING, false);

        if (!isset($this->originalsp['disco.doNotFilterIdps'])
            || !$this->originalsp['disco.doNotFilterIdps']
        ) {
            $list = parent::filterList($list);
            $list = $this->scoping($list);
            if (!$disableWhitelisting) {
                $list = $this->whitelisting($list);
            }
            $list = $this->greylisting($list);
            $list = $this->greylistingPerSP($list, $this->originalsp);
        }

        if (empty($list)) {
            throw new Exception('All IdPs has been filtered out. And no one left.');
        }

        return $list;
    }
628685
public function set($name, $value = null): self
    {
        if (!is_array($name)) {
            $name = [$name => $value];
        }

        foreach ($name as $property => $value) {
            $this->_data[$property] = $value;
        }

        return $this;
    }
268559
public function push(string $name, $pushValue)
    {
        if (! is_array($pushValue)) {
            $pushValue = [$pushValue];
        }

        if (! $this->has($name)) {
            $this->put($name, $pushValue);

            return $this;
        }

        $oldValue = $this->get($name);

        if (! is_array($oldValue)) {
            $oldValue = [$oldValue];
        }

        $newValue = array_merge($oldValue, $pushValue);

        $this->put($name, $newValue);

        return $this;
    }
461177
private function addToWhiteList(array $whiteList) {
        $current = $this->getWhiteList();
        $current = array_merge($current, $whiteList);
        $this->setWhiteList($current);
    }
1080920
public function setWhitelist($whitelist)
    {
        if (!is_array($whitelist)) {
            $whitelist = preg_split('/\s*,\s*/', $whitelist);
        }
        $this->whitelist = $whitelist;
        return $this;
    }
38218
public function remove($name = null)
    {
        $list = self::$_postTypes;
        
        unset($list[$name]);
        
        if (!$name) {
            $list = null;
        }
        
        self::$_postTypes = $list;
    }
629938
public function addColumn($name, $content, $order = false)
    {
        $this->pushToBlacklist($name);

        return parent::addColumn($name, $content, $order);
    }
209544
protected function __apiForceDelete(array $list)
    {
        HCPagesTranslations::onlyTrashed()->whereIn('record_id', $list)->forceDelete();
        HCPages::onlyTrashed()->whereIn('id', $list)->forceDelete();

        return hcSuccess();
    }
470004
public function select(
        $name,
        $list = [],
        $selected = null,
        array $selectAttributes = [],
        array $optionsAttributes = [],
        array $optgroupsAttributes = []
    ) {
        $selectAttributes = $this->appendClassToOptions(Config::get('form-builder.control-class'), $selectAttributes);

        return parent::select($name, $list, $selected, $selectAttributes, $optionsAttributes);
    }
668715
protected function __apiForceDelete (array $list)
    {
        HCGroupsUsers::whereIn ('group_id', $list)->forceDelete ();
        HCGroups::onlyTrashed ()->whereIn ('id', $list)->forceDelete ();

        return hcSuccess ();
    }
728666
public function PushVar( $name )
	{
		$id = $this->NewReference();
		$this->_slots[] = new NameSlot( $id, $name );
		return $id;
	}