Refreshes selections and colors UUIDs.

@param SelectionQuestion $item
196689
public function refreshIdentifiers(AbstractItem $item)
    {
        /** @var Color $color */
        foreach ($item->getColors() as $color) {
            $color->refreshUuid();
        }

        /** @var Selection $selection */
        foreach ($item->getSelections() as $selection) {
            $selection->refreshUuid();
        }
    }
1079161
private function setValue($item) : void
    {
        if (is_string($item)) {
            return;
        }
        $element = $item->getElement();
        $name = $element->name();
        if ($element instanceof File) {
            if (array_key_exists($name, $_FILES)) {
                $element->setValue($_FILES[$name]);
                $element->valueSuppliedByUser(true);
            }
        } elseif (array_key_exists($name, $_POST)) {
            if ($element instanceof Radio) {
                if ($_POST[$name] == $element->getValue()
                    || (is_array($_POST[$name])
                        && in_array($element->getValue(), $_POST[$name])
                    )
                ) {
                    $element->check();
                } else {
                    $element->check(false);
                }
            } else {
                $element->setValue($_POST[$name]);
            }
            $element->valueSuppliedByUser(true);
        } elseif ($element instanceof Radio) {
            $element->check(false);
        }
    }
529826
protected final void itemHasBeenRestored(AbstractItem item)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "itemHasBeenRestored", item);

        super.itemHasBeenRestored(item);
        _setWatermarks((ItemStream)item);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "itemHasBeenRestored");
    }
835518
public function addItem($item)
    {
        $indentation = $this->indent($this->indentation);

        $this->buffer[] = $indentation.$item;
    }
97036
private void updateSelection() {
        Dateitem selectedItem = getSelectedItem();
        
        if (selectedItem == null) {
            addStyle("color", "gray");
        } else {
            addStyle("color", "inherit");
        }
        
        setFocus(false);
    }
716429
public function remove($item)
    {
        $renumberKeys = false;
        foreach ($this->items as $key => $value) {
            if ($item === $value) {
                $renumberKeys = true;
                unset($this->items[$key]);
            }
        }
        if ($renumberKeys) {
            $this->items = array_values($this->items);
        }
    }
91612
protected function checkVoteItem($item)
    {
        if ($item instanceof \Illuminate\Database\Eloquent\Model) {
            $this->setVoteRelation(get_class($item));
            return $item->id;
        };

        return $item;
    }
1171503
function select_dropdown_item (item) {
          if(item) {
              if(selected_dropdown_item) {
                  deselect_dropdown_item($(selected_dropdown_item));
              }

              item.addClass($(input).data("settings").classes.selectedDropdownItem);
              selected_dropdown_item = item.get(0);
          }
      }
1342925
protected function processItem($item) {
        if($item instanceof \CharlotteDunois\Yasmin\Interfaces\RatelimitBucketInterface) {
            if($item->isBusy()) {
                $this->queue[] = $item;
                
                foreach($this->queue as $qitem) {
                    if(!($qitem instanceof \CharlotteDunois\Yasmin\Interfaces\RatelimitBucketInterface) || !$qitem->isBusy()) {
                        $this->processItem($qitem);
                        return;
                    }
                }
                
                return;
            }
            
            $item->setBusy(true);
            $buckItem = $this->extractFromBucket($item);
            
            if(!($buckItem instanceof \React\Promise\ExtendedPromiseInterface)) {
                $buckItem = \React\Promise\resolve($buckItem);
            }
            
            $buckItem->done(function ($req) use ($item) {
                $item->setBusy(false);
                
                if(!($req instanceof \CharlotteDunois\Yasmin\HTTP\APIRequest)) {
                    return;
                }
                
                $this->execute($req);
            }, array($this->client, 'handlePromiseRejection'));
        } else {
            if(!($item instanceof \CharlotteDunois\Yasmin\HTTP\APIRequest)) {
                return;
            }
            
            $this->execute($item);
        }
    }
183901
public void refreshUserInfoDropDown() {

        Component oldVersion = m_userDropDown;
        m_userDropDown = createUserInfoDropDown();
        m_itemsRight.replaceComponent(oldVersion, m_userDropDown);
    }
1255226
public function add ($item) {
        if (!$this->getConnection ()->getClient ()->sadd ($this->name , $item)) {
            return false;
        }
        $this->_data = null;
        $this->_count = null;
        return true;
    }
900012
function (newItems) {
            var res = this._mergeItemsAndSelectionInfo(newItems, this.getSelectedValues());
            this._setItems(res.items);
            this.json.setValue(this._data, "selectedIndex", res.selectedIndex);
            this.json.setValue(this._data, "selectedCount", res.selectedCount);
        }
16974
protected void onSelectedItemsChanged() {
        final Collection<ItemT> selectedItems = getSelectedItems();
        if (selectedItems.isEmpty()) {
            anchorLabel();
            getInputWidget().setText("");
        } else {
            getInputWidget().setText(getItemPrinter().printCollection(selectedItems));
            floatLabel();
        }
        if (itemPickerListener != null) itemPickerListener.onSelectionChanged(this, selectedItems);
    }
643686
protected function itemMatchesSelector($item, $selector)
    {
        // the selector is a simple path identifier
        // NOT something like key[*][subkey]
        if (strpos($selector, '*') === false) {
            return $item === $selector;
        }
        $regex = '/' . str_replace('*', '[^\]]+', str_replace(array(
            '[',
            ']'
        ), array(
            '\[',
            '\]'
        ), $selector)) . '/';
        return preg_match($regex, $item);
    }
437739
public function add_item(cc_i_item &$item) {
        if (is_null($this->itemlist)) {
            $this->itemlist = array();
        }
        $this->itemlist[$item->identifier] = $item;
    }
1338941
public function addSelection(Selection $selection)
    {
        if (!$this->selections->contains($selection)) {
            $this->selections->add($selection);
            $selection->setInteractionSelection($this);
        }
    }
442764
public function index(Item $item)
    {
        $indexed = true;

        $this->type = $item->getType();
        $this->setLogging($item);

        $solrConnections = $this->getSolrConnectionsByItem($item);
        foreach ($solrConnections as $systemLanguageUid => $solrConnection) {
            $this->solr = $solrConnection;

            if (!$this->indexItem($item, $systemLanguageUid)) {
                /*
                 * A single language voting for "not indexed" should make the whole
                 * item count as being not indexed, even if all other languages are
                 * indexed.
                 * If there is no translation for a single language, this item counts
                 * as TRUE since it's not an error which that should make the item
                 * being reindexed during another index run.
                 */
                $indexed = false;
            }
        }

        return $indexed;
    }