fetches values from the grid flexform and assigns them to virtual fields in the data array
@param array $child
197573
public function getPluginFlexFormData(&$child = [])
    {
        if (!empty($child)) {
            $cObjData = $child;
        } else {
            $cObjData = $this->cObj->data;
        }

        $pluginFlexForm = $cObjData['pi_flexform'];

        if (is_array($pluginFlexForm) && is_array($pluginFlexForm['data'])) {
            foreach ($pluginFlexForm['data'] as $sheet => $data) {
                if (is_array($data)) {
                    foreach ((array)$data as $language => $value) {
                        if (is_array($value)) {
                            foreach ((array)$value as $key => $val) {
                                $cObjData['flexform_' . $key] = $this->getFlexFormValue(
                                    $pluginFlexForm,
                                    $key,
                                    $sheet
                                );
                            }
                        }
                    }
                }
            }
        }

        unset($pluginFlexForm);

        if (!empty($child)) {
            $child = $cObjData;
        } else {
            $this->cObj->data = $cObjData;
        }

        unset($cObjData);
    }
430112
protected function takeChildFromDOM($child)
    {
        $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
        switch ($absoluteNodeName) {
        case $this->lookupNamespace('gd') . ':' . 'entryLink':
            $entryLink = new Zend_Gdata_Extension_EntryLink();
            $entryLink->transferFromDOM($child);
            $this->_entryLink = $entryLink;
            break;
        case $this->lookupNamespace('gd') . ':' . 'originalEvent':
            $originalEvent = new Zend_Gdata_Extension_OriginalEvent();
            $originalEvent->transferFromDOM($child);
            $this->_originalEvent = $originalEvent;
            break;
        default:
            parent::takeChildFromDOM($child);
            break;
        }
    }
140632
protected function takeChildFromDOM($child)
    {
        $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
        switch ($absoluteNodeName) {
        case $this->lookupNamespace('yt') . ':' . 'description':
            $description = new Zend_Gdata_YouTube_Extension_Description();
            $description->transferFromDOM($child);
            $this->_description = $description;
            break;
        case $this->lookupNamespace('yt') . ':' . 'countHint':
            $countHint = new Zend_Gdata_YouTube_Extension_CountHint();
            $countHint->transferFromDOM($child);
            $this->_countHint = $countHint;
            break;
        case $this->lookupNamespace('yt') . ':' . 'playlistId':
            $playlistId = new Zend_Gdata_YouTube_Extension_PlaylistId();
            $playlistId->transferFromDOM($child);
            $this->_playlistId = $playlistId;
            break;
        case $this->lookupNamespace('gd') . ':' . 'feedLink':
            $feedLink = new Zend_Gdata_Extension_FeedLink();
            $feedLink->transferFromDOM($child);
            $this->_feedLink[] = $feedLink;
            break;
        default:
            parent::takeChildFromDOM($child);
            break;
        }
    }
77695
protected function mapModelDataToElement(ElementInterface $child)
    {
        $this->setDefaultElementValue($child);
        
        $children = $child->getChildren();
        
        if ($children->count()) {
            $this->mapModelDataToElementCollection($children);
        }
    }
1032757
public function addChild(Node $child)
    {
        $this->children[]            = $child;
        $child->parent               = $this;
        $child->properties['parent'] = $this->getId();
    }
154887
public function setChild($parent, $child)
    {
        if (is_string($parent)) {
            $name   = $parent;
            $parent = $this->getItem($parent);
            if (is_null($parent)) {
                throw new Exception("Unknown parent:$name at setChild");
            }
        }
        if (is_string($child)) {
            $name  = $child;
            $child = $this->getItem($child);
            if (is_null($child)) {
                throw new Exception("Unknown child:$name at setChild");
            }
        }
        if (isset($this->children[$parent->name][$child->name])) {
            return false;
        }

        return $this->addChild($parent, $child);
    }
1090470
protected function takeChildFromDOM($child)
    {
        $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;

        switch ($absoluteNodeName) {
            case $this->lookupNamespace('apps') . ':' . 'login';
                $login = new Zend_Gdata_Gapps_Extension_Login();
                $login->transferFromDOM($child);
                $this->_login = $login;
                break;
            case $this->lookupNamespace('apps') . ':' . 'name';
                $name = new Zend_Gdata_Gapps_Extension_Name();
                $name->transferFromDOM($child);
                $this->_name = $name;
                break;
            case $this->lookupNamespace('apps') . ':' . 'quota';
                $quota = new Zend_Gdata_Gapps_Extension_Quota();
                $quota->transferFromDOM($child);
                $this->_quota = $quota;
                break;
            case $this->lookupNamespace('gd') . ':' . 'feedLink';
                $feedLink = new Zend_Gdata_Extension_FeedLink();
                $feedLink->transferFromDOM($child);
                $this->_feedLink[] = $feedLink;
                break;
            default:
                parent::takeChildFromDOM($child);
                break;
        }
    }
261117
protected function takeChildFromDOM($child)
    {
        $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
        switch ($absoluteNodeName) {
        case $this->lookupNamespace('openSearch') . ':' . 'totalResults':
            $totalResults = new Zend_Gdata_Extension_OpenSearchTotalResults();
            $totalResults->transferFromDOM($child);
            $this->_totalResults = $totalResults;
            break;
        case $this->lookupNamespace('openSearch') . ':' . 'startIndex':
            $startIndex = new Zend_Gdata_Extension_OpenSearchStartIndex();
            $startIndex->transferFromDOM($child);
            $this->_startIndex = $startIndex;
            break;
        case $this->lookupNamespace('openSearch') . ':' . 'itemsPerPage':
            $itemsPerPage = new Zend_Gdata_Extension_OpenSearchItemsPerPage();
            $itemsPerPage->transferFromDOM($child);
            $this->_itemsPerPage = $itemsPerPage;
            break;
        default:
            parent::takeChildFromDOM($child);
            break;
        }
    }
1038360
public function addChild(self $child)
    {
        if (!is_array($this->children)) {
            $this->children = [];
        }

        $this->children[] = $child;
    }
1351393
public function addChild(self $child)
    {
        if (isset($this->children[$child->name])) {
            throw new \InvalidArgumentException(sprintf(
                'Child with key "%s" already exists',
                $child->name
            ));
        }

        $this->children[$child->name] = $child;
    }
326169
public function addChild(Form_ElementModel $child)
	{
		if(!$this->allowChildren)
		{
			throw new Exception(__CLASS__." doesn't support children");
		}
		$this->children[] = $child;
	}
564108
function addChildX(X $child) {
		/** @var X $childInThis */
		$childInThis = $this->addChild($child->getName(), (string)$child);
		foreach ($child->attributes() as $attr => $value) {
			/** @var string $name */
			/** @var string $value */
			$childInThis->addAttribute($attr, $value);
		}
		foreach ($child->children() as $childChild) {
			/** @var X $childChild */
			$childInThis->addChildX($childChild);
		}
	}
318703
protected function takeChildFromDOM($child)
    {
        $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;

        switch ($absoluteNodeName) {
            case $this->lookupNamespace('gml') . ':' . 'Point';
                $point = new Zend_Gdata_Geo_Extension_GmlPoint();
                $point->transferFromDOM($child);
                $this->_point = $point;
                break;
        }
    }
799308
public function addChild($child)
    {
        if ($child instanceof SwatDataTreeNode) {
            $child = self::convertFromDataTree($child);
        }

        parent::addChild($child);
    }
786983
public function addChild(self $child)
    {
        if ($this->isVoid) {
            throw new Exception\RuntimeException(
                'Void elements can\'t have child elements.'
            );
        }

        $this->children[] = $child;

        return $this;
    }
535558
public function getCMSFields() {
		$fields = parent::getCMSFields();

		$fields->removeByName('ParentID');
		if (count($this->remoteProperties)) {
			$mapping = $this->editableFieldMapping();
			foreach ($this->remoteProperties as $name => $value) {
				$field = null;
				if (isset($mapping[$name])) {
					$field = $mapping[$name];
					if (is_string($field)) {
						$field = new $field($name, $this->fieldLabel($name), $value);
						$fields->addFieldToTab('Root.Main', $field);
					}
				} else if(!is_object($value) && !is_array($value)){
					$value = (string) $value;
					$field = new ReadonlyField($name, _t('ExternalContentItem.' . $name, $name), $value);
					$fields->addFieldToTab('Root.Main', $field);
				} else if(is_object($value) || is_array($value)){
					foreach($value as $childName => $childValue) {
						if(is_object($childValue)) {
							foreach($childValue as $childChildName => $childChildValue) {
								$childChildValue = is_object($childChildValue) || is_array($childChildValue) ? json_encode($childChildValue) : (string) $childChildValue;
								$field = new ReadonlyField("{$childName}{$childChildName}", "{$childName}: {$childChildName}", $childChildValue);
								$fields->addFieldToTab('Root.Main', $field);
							}
						}
						else {
							$childValue =  is_object($childValue) || is_array($childValue) ? json_encode($childValue) : (string) $childValue;
							$field = new ReadonlyField("{$childName}{$childValue}", $name . ':' . $childName, $childValue);
							$fields->addFieldToTab('Root.Main', $field);
						}
					}
				}
			}
		}

		return $fields;
	}
817861
public function addChild($child)
    {
        $child->parent = $this;
        $child->index = count($this->children);
        $this->children[] = $child;
    }