protected function addNewValues(array $selections, array $values)
    {
        if ($this->isAllowAdd()) {
            foreach ($values as $value) {
                if (!\in_array($value, $selections) && !\in_array((string) $value, $selections)) {
                    $selections[] = (string) $value;
                }
            }
        }

        return $selections;
    }
protected function addNewValues(array $selections, array $values)
    {
        if ($this->isAllowAdd()) {
            foreach ($values as $value) {
                if (!\in_array($value, $selections) && !\in_array((string) $value, $selections)) {
                    $selections[] = (string) $value;
                }
            }
        }

        return $selections;
    }
protected function addNewValues ( array $ selections , array $ values ) { if ( $ this -> isAllowAdd ( ) ) { foreach ( $ values as $ value ) { if ( ! \ in_array ( $ value , $ selections ) && ! \ in_array ( ( string ) $ value , $ selections ) ) { $ selections [ ] = ( string ) $ value ; } } } return $ selections ; }
Add new values.

@param array $selections The list of selection
@param array $values     The list of value

@return array The list of new selection
Add new values .