Add an array of regions
@see add_region()

@param array $regions this utility method calls add_region for each array element.
497334
public function add_regions($regions, $custom = true) {
        foreach ($regions as $region) {
            $this->add_region($region, $custom);
        }
    }
275732
public function setRegion($region, $item)
    {
        if (is_array($item)) {
            $template = array_shift($item);
            $data = $item ? reset($item) : array();
            $content = $this->render($template, $data);
        } else {
            $content = trim($item);
        }

        if ($content !== '' && isset($this->templates["region_$region"])) {

            $weight = 1;

            if (isset($this->data["region_$region"])) {
                $weight = count($this->data["region_$region"]) + 1;
            }

            $this->data["region_$region"][] = array('rendered' => $content, 'weight' => $weight);
        }
    }
1258251
public function add($items = [])
    {
        if (!is_array($items) || func_num_args() > 1) {
            $items = func_get_args();
        }

        $this->push($this->formatInnerField(null, $items));
    }
854447
public function addExtensions(array $extensions)
	{
		if ($extensions)
		{
			$keys = array_map('snake_case', array_keys($extensions));

			$extensions = array_combine($keys, array_values($extensions));
		}

		$this->extensions = array_merge($this->extensions, $extensions);
	}
729799
public function addParamsGrouping($fields = [])
    {
        if (is_array($fields) && !empty($fields))
        {
            $this->groupingParams = array_merge(is_array($this->groupingParams) ? $this->groupingParams : [], $fields);
        }
    }
979140
public function add($section, $config = array())
    {
        if (! isset($this->config[$section])) {
            $this->config[$section] = array();
        }

        $this->config[$section] = array_merge($this->config[$section], $config);
    }
867082
function(regionDefinitions, defaults){
      var regions = {};

      _.each(regionDefinitions, function(definition, name){
        if (typeof definition === "string"){
          definition = { selector: definition };
        }

        if (definition.selector){
          definition = _.defaults({}, definition, defaults);
        }

        var region = this.addRegion(name, definition);
        regions[name] = region;
      }, this);

      return regions;
    }
891717
public function addAll(array $elements)
    {
        if (is_array($elements)) {
            foreach ($elements as $element) {
                $this->_items[] = $element;
            }
            $this->_iterator = null;
        } else {
            throw new CollectionException('Given array can not added to collection, because it is no array.', E_NOTICE);
        }
    }
712733
public function setRegion($region)
    {
        $allowed_values = $this->getRegionAllowableValues();
        if (!in_array($region, $allowed_values)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'region', must be one of '%s'",
                    implode("', '", $allowed_values)
                )
            );
        }
        $this->container['region'] = $region;

        return $this;
    }
1121484
protected function addHeaders(array $headers)
    {
        foreach ($headers as $key => $val) {
            $normalized = strtolower($key);
            $this->headers[$key] = (array)$val;
            $this->headerNames[$normalized] = $key;
        }
    }
1057789
protected function addElementsToIndexes($elements, array $indexes): void
    {
        if (!is_array($elements)) {
            $elements = [$elements];
        }

        /** @var DescriptorAbstract $element */
        foreach ($elements as $element) {
            /** @var Collection $collection */
            foreach ($indexes as $collection) {
                $collection->set($this->getIndexKey($element), $element);
            }
        }
    }
402620
public void addArea(final Section AREA) {
        if (null == AREA) return;
        areas.add(AREA);
        Collections.sort(areas, new SectionComparator());
        fireUpdateEvent(SECTION_EVENT);
    }
356837
public function addColumns(array $cols) {
        foreach ($cols as $col) {
            $this->cols[] = DataColumn::fromArray($col);
        }
    }
33234
public function addIgnoreBlocks($blocks)
    {
        if (is_array($blocks)) {
            foreach ($blocks as $openTag => $closeTag) {
                $this->addIgnoreBlock($openTag, $closeTag);
            }
        }
    }
866778
function(regions){
    var that = this;

    var defaults = {
      regionType: Marionette.getOption(this, "regionType"),
      parentEl: function(){ return that.$el; }
    };

    return this.regionManager.addRegions(regions, defaults);
  }
643142
public function addHeaders(array $headers)
    {
        foreach ($headers as $name => $content) {
            $this->headers[$name] = $content;
        }
    }
138167
public function setRegion($region)
    {
        $this->region = strtolower($region);

        $this->updateApiUrl($region);
        $this->updateApiAccessTokenUrl($region);

        return $this;
    }