Merge the HTML document head data

@param   array   $data  The document head data in array form
@return  object  instance of $this to allow chaining
501330
public function mergeHeadData($data)
	{
		if (empty($data) || !is_array($data))
		{
			return;
		}

		$this->title = (isset($data['title']) && !empty($data['title']) && !stristr($this->title, $data['title']))
			? $this->title . $data['title']
			: $this->title;
		$this->description = (isset($data['description']) && !empty($data['description']) && !stristr($this->description, $data['description']))
			? $this->description . $data['description']
			: $this->description;
		$this->link = (isset($data['link'])) ? $data['link'] : $this->link;

		if (isset($data['metaTags']))
		{
			foreach ($data['metaTags'] as $type1 => $data1)
			{
				$booldog = $type1 == 'http-equiv' ? true : false;
				foreach ($data1 as $name2 => $data2)
				{
					$this->setMetaData($name2, $data2, $booldog);
				}
			}
		}

		$this->_links = (isset($data['links']) && !empty($data['links']) && is_array($data['links']))
			? array_unique(array_merge($this->_links, $data['links']))
			: $this->_links;

		$this->_styleSheets = (isset($data['styleSheets']) && !empty($data['styleSheets']) && is_array($data['styleSheets']))
			? array_merge($this->_styleSheets, $data['styleSheets'])
			: $this->_styleSheets;

		if (isset($data['style']))
		{
			foreach ($data['style'] as $type => $stdata)
			{
				if (!isset($this->_style[strtolower($type)]) || !stristr($this->_style[strtolower($type)], $stdata))
				{
					$this->addStyleDeclaration($stdata, $type);
				}
			}
		}

		$this->_scripts = (isset($data['scripts']) && !empty($data['scripts']) && is_array($data['scripts']))
			? array_merge($this->_scripts, $data['scripts'])
			: $this->_scripts;

		if (isset($data['script']))
		{
			foreach ($data['script'] as $type => $sdata)
			{
				if (!isset($this->_script[strtolower($type)]) || !stristr($this->_script[strtolower($type)], $sdata))
				{
					$this->addScriptDeclaration($sdata, $type);
				}
			}
		}

		$this->_custom = (isset($data['custom']) && !empty($data['custom']) && is_array($data['custom']))
			? array_unique(array_merge($this->_custom, $data['custom']))
			: $this->_custom;

		return $this;
	}
1293393
public function setData(array $data)
    {
        $this->isMergingData = true;
        /**
         * @todo Kinda hacky, but works with the concept of form.
         *     Should work embeded in a form group or in a dashboard.
         */
        $data = array_merge($_GET, $data);

        parent::setData($data);

        /** Merge any available presets */
        $data = $this->mergePresets($data);

        parent::setData($data);

        $this->isMergingData = false;

        if ($this->lang()) {
            $this->translator()->setLocale($this->lang());
        }

        return $this;
    }
354630
public function setFormData(array $data)
    {
        $objData = $this->objData();
        $merged = array_replace_recursive($objData, $data);

        // Remove null values
        $merged = array_filter($merged, function ($val) {
            if ($val === null) {
                return false;
            }

            return true;
        });

        $this->formData = $merged;
        $this->obj()->setData($merged);

        return $this;
    }
968952
public function merge(array $data) : Vector
    {
        $values = $this->_merge($data);
        $this->setValues($values);
        return $this;
    }
1288732
public function setData(array $data) {
		$this->data = $data;

		$this->resetFields();

		foreach($data as $name=>$data)
			$this->newField($name, $data);

		$this->updateChilds();

		return $this;
	}
154175
public function merge($data)
	{
		foreach ($data as $key => $value) {
			$this->set($key, $value);
		}
	}
305486
public function mergeData($data, $overridePrevious = true)
    {
        $oldData = $this->getData();
        if ($oldData === null) {
            $oldData = [];
        }
        if (is_object($data)) {
            $data = get_object_vars($data);
        }
        $this->setData($overridePrevious ? array_merge($oldData, $data) : array_merge($data, $oldData));
        return $this;
    }
285280
protected function mergePresets(array $data)
    {
        if (isset($data['attachable_objects'])) {
            $data['attachable_objects'] = $this->mergePresetAttachableObjects($data['attachable_objects']);
        }

        if (isset($data['default_attachable_objects'])) {
            $data['attachable_objects'] = $this->mergePresetAttachableObjects($data['default_attachable_objects']);
        }

        if (isset($data['preset'])) {
            $data = $this->mergePresetWidget($data);
        }

        return $data;
    }
132967
public function bind(array $data)
	{
		if (null === $this->object)
		{
			$this->object = new Object;
		}

		$this->object->bind($data);

		return $this;
	}
222861
public function mergeData(array $data)
	{
		$args = func_get_args();
		while (list(,$v) = each($args)) {
			if (is_array($v)) {
				$this->data = array_merge($this->data, $v);
			}
		}
	}
303475
public function fill(array $data)
    {
        /* @var Field $field */
        foreach ($this->fields() as $field) {
            $field->fill($data);
        }

        return $this;
    }
1023102
public function mergeUnmodified(array $data)
    {
        $this->mergeUnmodifiedPartial($this->data, $data);
        $this->mergeUnmodifiedPartial($this->originalData, $data);

        return $this;
    }
1282708
public function merge(array $data)
    {
        $this->isMergingWidgetData = true;

        $data = $this->setCoreData($data);

        $this->mergePropertyData($data);

        $this->isMergingWidgetData = false;

        return $this;
    }
881747
public function createDocument(array $data = null)
    {
        $className = $this->getDocumentClassName($data);

        /* @var $document \Sokil\Mongo\Document */
        $document = new $className(
            $this,
            $data,
            array('stored' => false) + $this->definition->getOptions()
        );

        // store document to identity map
        if ($this->isDocumentPoolEnabled()) {
            $collection = $this;
            $document->onAfterInsert(function (\Sokil\Mongo\Event $event) use ($collection) {
                $collection->addDocumentToDocumentPool($event->getTarget());
            });
        }

        return $document;
    }
1330528
public function addGroups($data){

        foreach ($data as $k=>$v){
            $groups[] = ['name' => $k , 'title' => $v];
        }
        $this->formGroups = $groups;
        return $this;
    }
194080
public function merge($data)
    {

        if ($data instanceof DedicatedPlayer) {
            $data = $data->toArray();
        }

        foreach ($data as $key => $value) {
            $key = lcfirst($key);
            $this->$key = $value;
        }

        return $this;
    }
520893
public function setData(array $data)
    {
        foreach ($this->getData()->toArray() as $key => $value) {
            $this->getData()->offsetUnset($key);
        }

        $this->addData($data);

        return $this;
    }