@description
Safley sets item to session storage. Alias: item()

@param {String} itemName The items name
@param {String} itemValue The items value
439905
function setItem(itemName, itemValue) {
  data[itemName] = itemValue;
  if (localExists()) {
    // Convert object to string
    if ((0, _isObject2.default)(itemValue)) {
      itemValue = JSON.stringify(itemValue);
    }
    window.sessionStorage.setItem(itemName, itemValue);
  }
}
375278
function getItem(itemName) {
  if (data[itemName]) {
    return data[itemName];
  } else if (localExists()) {
    var itemStr = window.sessionStorage.getItem(itemName);
    // Check that str is not null before parsing
    if (itemStr) {
      var isObj = false;
      var itemObj = null;
      // Try parsing to object
      try {
        itemObj = JSON.parse(itemStr);
        isObj = true;
      } catch (err) {
        // Parsing failed, this must just be a string
        // logger.log({message: 'String could not be parsed.', error: err, func: 'getItem', obj: 'storage'})
        isObj = false;
      }
      if (isObj) {
        return itemObj;
      }
    }
    return itemStr;
  } else {
    return null;
  }
}
706379
function getItemAsNameVal (item) {
    if (!item) {
      return undefined;
    }

    var locals = {};
    if (ctrl.itemName) {
      locals[ ctrl.itemName ] = item;
    }

    return locals;
  }
549162
public void setItem(java.util.Collection<ApplicationResponse> item) {
        if (item == null) {
            this.item = null;
            return;
        }

        this.item = new java.util.ArrayList<ApplicationResponse>(item);
    }
463821
function ItemsItem() {
    /**
     * The id value
     * @member
     */
    this.id = null;
    /**
     * The sku value
     * @member
     */
    this.sku = null;
    /**
     * The title value
     * @member
     */
    this.title = null;
    /**
     * The quantity value
     * @member
     */
    this.quantity = null;
    /**
     * The price value
     * @member
     */
    this.price = null;
    /**
     * The formattedPrice value
     * @member
     */
    this.formattedPrice = null;
    /**
     * The currency value
     * @member
     */
    this.currency = null;
    /**
     * The productLink value
     * @member
     */
    this.productLink = null;
    /**
     * The weight value
     * @member
     */
    this.weight = null;
    /**
     * The formattedWeight value
     * @member
     */
    this.formattedWeight = null;
    /**
     * The media of value
     * @member
     * @type { Media }
     */
    this.media = Object.create(Media.prototype);

}
381140
private function verifyItemExistenceInSubItemList(string $itemName, string $itemType, string $containerName, bool $itemShouldExist): void
    {
        $isItemInTable = PageObjectFactory::createPage($this->utilityContext, ContentItemPage::PAGE_NAME, $containerName)
            ->subItemList->table->isElementInTable($itemName, $itemType);

        $itemShouldExistString = $itemShouldExist ? '' : 'n\'t';

        if ($isItemInTable !== $itemShouldExist) {
            Assert::fail(sprintf('%s "%s" should%s be on %s Sub-items list', $itemType, $itemName, $itemShouldExistString, $containerName));
        }
    }
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);
        }
    }
733256
function setUserCache(key, value) {
    var userCode = this.getEnvironment().usercode;
    if (!userCode) return;
    localStorage.setItem(userCode + key, value);
}
771549
function removeItem(key) {
  cookie$1.removeItem(key);
  session.removeItem(key);

  if (!hasLocalStorage()) {
    return;
  }

  localstorage.removeItem(key);
}
830351
function (item) {
        return this.members.indexOf(_.isString(item) ? (item = this.one(item)) : item);
    }
735371
public void setItems(java.util.Collection<DomainName> items) {
        if (items == null) {
            this.items = null;
            return;
        }

        this.items = new java.util.ArrayList<DomainName>(items);
    }
692228
public function widgetToValue($varValue, $itemId)
    {
        if (null === $varValue) {
            return null;
        }
        static $cache = [];
        $attributeId = $this->get('id');
        if (array_key_exists($attributeId, $cache) && array_key_exists($varValue, $cache[$attributeId])) {
            return $cache[$attributeId][$varValue];
        }

        $model = $this->getSelectMetaModel();
        $alias = $this->getIdColumn();

        if ($model->hasAttribute($alias)) {
            $attribute = $model->getAttribute($alias);
            // It is an attribute, we may search for it.
            $ids = $attribute->searchFor($varValue);
        } else {
            // Must be a system column then.
            $result = $this->connection->createQueryBuilder()
                ->select('v.id')
                ->from($this->getSelectSource(), 'v')
                ->where('v.' . $this->getIdColumn() . '=:value')
                ->setParameter('value', $varValue)
                ->execute();

            $ids = $result->fetchAll(\PDO::FETCH_COLUMN);
        }

        // Maybe deleted value?
        if ([] === $ids) {
            return $cache[$attributeId][$varValue] = null;
        }

        // Multiple results.
        if (null === $ids || \count($ids) > 1) {
            throw new \RuntimeException(
                \sprintf(
                    'Multiple values found for %s, are there obsolete values for %s.%s (att_id: %s)?',
                    \var_export($varValue, true),
                    $model->getTableName(),
                    $this->getColName(),
                    $this->get('id')
                )
            );
        }
        $valueId = \array_shift($ids);

        $value = $this->getValuesById(
            [$valueId],
            [$this->getAliasColumn(), $this->getValueColumn(), $this->getIdColumn(), $this->getSortingColumn()]
        );

        return $cache[$attributeId][$varValue] = $value[$valueId];
    }
1055783
function writeValue(name, value, expInterval) {
  if (name && value) {
    if (pubcidConfig.typeEnabled === COOKIE) {
      setCookie(name, value, expInterval);
    } else if (pubcidConfig.typeEnabled === LOCAL_STORAGE) {
      setStorageItem(name, value, expInterval);
    }
  }
}
873388
protected void setProperty(String propertyName, JavascriptObject propertyValue) {
        jsObject.setMember(propertyName, propertyValue.getJSObject());
    }
1338573
function Item(item) {
  if (!item) item = {};

  utils.syncContents(this, item.contents || item.content);
  this.cache = item.cache || {};
  this.options = item.options || {};
  this.locals = item.locals || {};
  this.data = item.data || {};

  this.define('contents', {
    configurable: true,
    enumerable: false,
    set: function(val) {
      utils.syncContents(this, val);
    },
    get: function() {
      return this._contents;
    }
  });

  var base = item.base;
  delete item.base;

  Vinyl.call(this, item);
  Base.call(this, item);
  delete this.base;
  this.base = base;

  for (var key in item) {
    var val = item[key];
    if (key === 'stat' && utils.isObject(val) && val.mode) {
      this.set(key, utils.cloneStats(val));
    } else if (val) {
      this.set(key, val);
    }
  }

  this.is('Item');
  this.use(utils.option());
  this.use(utils.plugin());
}
30782
function Item(item, options) {
  Base.call(this, options);
  this.define('collection', this.options.collection);

  if (typeof item === 'object') {
    this.visit('set', item);
  }
}
408111
function setFieldValuesNestedArray (field, items) {
    // do not process unless value
    if (!defined(items)) {
        return
    }
    // property value must be array of items
    assert.ok(Array.isArray(items), 'expected array for '+field.property)
    // index of item in values array
    var idx = 0
    // create entry in field values for each item in array
    _.each(items, item => {
        // index string for field name
        var nameIdx = '['+idx+']'
        // each entry in values is an array of fields with values
        var values = []
        // add each sub field to values with value from record item
        _.each(field.fields, field => {
            // clone field to change properties for local version
            field = _.cloneDeep(field)
            // set value from item
            setFieldValue(item, field)
            // replace index in field name
            field.name = field.name.replace('[0]', nameIdx)
            // add field to list of values for item
            values.push(field)
        })
        // add row to values
        field.values.push(values)
        // increment row count
        idx++
    })
    // get index string for new row
    var nameIdx = '['+idx+']'
    // update row index for field names that will be used for a new row
    _.each(field.fields, field => {
        field.name = field.name.replace('[0]', nameIdx)
    })
}