Begin extend parent view file.
@param array $addParentData additional data from inherited view-file
165932
public function startParent($addParentData = [])
    {
        if (!empty($this->_extendingParent[$this->processingViewFile])) {
            throw new InvalidParamException("Nested startParent() impossible in '{$this->processingViewFile}'");
        }
        $this->_extendingParent[$this->processingViewFile] = true;

        $this->_addParentData[$this->processingViewFile] = $addParentData;

        ob_start(); // for lost all non-block info between startParent...stopParent
        ob_implicit_flush(false);
    }
389855
private function addInheritedFields(ClassMetadata $subClass, ClassMetadata $parentClass) : void
    {
        foreach ($parentClass->fieldMappings as $fieldName => $mapping) {
            if (! isset($mapping['inherited']) && ! $parentClass->isMappedSuperclass) {
                $mapping['inherited'] = $parentClass->name;
            }
            if (! isset($mapping['declared'])) {
                $mapping['declared'] = $parentClass->name;
            }
            $subClass->addInheritedFieldMapping($mapping);
        }
        foreach ($parentClass->reflFields as $name => $field) {
            $subClass->reflFields[$name] = $field;
        }
    }
1027565
private function extend_view($text, $params = array())
	{
		// se presente, procedi con l'estensione
		if(strpos($text, '@extends(') !== false)
		{
			// extract the template name
			$pieces = explode('@extends(', $text);
			$pieces = explode(')', $pieces[1]);
			if(count($pieces) <= 0)
				return $text;
			
			$parent_view = new View(ViewUtility::trim($pieces[0]), $params, false);
			$result = $parent_view->render(false);

			// remove all the extends
			foreach (ViewUtility::find_rules($result, '@extends', ')') as $extend) {
				$result = str_replace($extend, '', $result );
			}

			$this->extended = true;
			return $result;
		}
		return $text;
	}
496048
protected void mergeParent(CmsADEConfigDataInternal parent) {

        List<CmsResourceTypeConfig> parentTypes = null;
        if (parent != null) {
            parentTypes = parent.m_ownResourceTypes;
        } else {
            parentTypes = Collections.emptyList();
        }

        List<CmsPropertyConfig> parentProperties = null;
        if (parent != null) {
            parentProperties = parent.m_ownPropertyConfigurations;
        } else {
            parentProperties = Collections.emptyList();
        }

        List<CmsModelPageConfig> parentModelPages = null;
        if (parent != null) {
            parentModelPages = parent.m_ownModelPageConfig;
        } else {
            parentModelPages = Collections.emptyList();
        }

        List<CmsFunctionReference> parentFunctionRefs = null;
        if (parent != null) {
            parentFunctionRefs = parent.m_functionReferences;
        } else {
            parentFunctionRefs = Collections.emptyList();
        }

        m_ownResourceTypes = CmsADEConfigData.combineConfigurationElements(parentTypes, m_ownResourceTypes, false);
        m_ownPropertyConfigurations = CmsADEConfigData.combineConfigurationElements(
            parentProperties,
            m_ownPropertyConfigurations,
            false);
        m_ownModelPageConfig = CmsADEConfigData.combineConfigurationElements(
            parentModelPages,
            m_ownModelPageConfig,
            false);
        m_functionReferences = CmsADEConfigData.combineConfigurationElements(
            parentFunctionRefs,
            m_functionReferences,
            false);
        if ((parent != null) && (m_ownDynamicFunctions == null)) {
            m_dynamicFunctions = parent.m_dynamicFunctions;
        } else {
            m_dynamicFunctions = m_ownDynamicFunctions;
        }
    }
913637
function _addNewEntries(treeData, added) {
        added.forEach(function (filePath) {
            var isFolder = _.last(filePath) === "/";

            filePath = isFolder ? filePath.substr(0, filePath.length - 1) : filePath;

            var parentPath = FileUtils.getDirectoryPath(filePath),
                parentObjectPath = _filePathToObjectPath(treeData, parentPath),
                basename = FileUtils.getBaseName(filePath);

            if (parentObjectPath) {
                // Verify that the children are loaded
                var childrenPath = _.clone(parentObjectPath);
                childrenPath.push("children");
                if (treeData.getIn(childrenPath) === null) {
                    return;
                }

                treeData = _createPlaceholder(treeData, parentPath, basename, isFolder, {
                    notInCreateMode: true,
                    doNotOpen: true
                });
            }
        });

        return treeData;
    }
357725
public function addItem($parentId, $data)
    {
        if (empty($parentId)) {
            $this->items[0][] = $data;
        } else {
            $this->items[$parentId][] = $data;
        }
    }
401221
function (data) {
    this.on("change:parent", this._onParent);

    // copy the data to this object. Note this shaves a TON
    // of time off initializing any view, especially list items if we
    // use this method over @setProperties data
    if (false) {
      for(var key in data) {
        this[key] = data[key];
      }
    }

    // necessary to properly dispose this view so it can be recycled
    if (this.parent) this._onParent(this.parent);
  }
968303
function extend(child, parent) {
        for (var property in parent) {
            if (typeof child[property] == 'undefined') {
                child[property] = parent[property];
            }
        }
        return child;
    }
1311436
public function html(string $html, array $parentAttributes = [])
    {
        return $this->add(Html::raw($html)->setParentAttributes($parentAttributes));
    }
85276
final protected function assertClassExtends(string $parentClassName, string $className): void
    {
        $this->assertClassExists($parentClassName);
        $this->assertClassExists($className);

        $reflection = new \ReflectionClass($className);

        self::assertTrue($reflection->isSubclassOf($parentClassName), \sprintf(
            'Failed asserting that class "%s" extends "%s".',
            $className,
            $parentClassName
        ));
    }
1312420
final protected function parseData(array $data, $parentId = 0)
    {
        $result = array();

        foreach ($data as $subArray) {
            $nested = array();

            if (isset($subArray[$this->childrenKey])) {
                // Recursive call
                $nested = $this->parseData($subArray[$this->childrenKey], $subArray[RelationBuilder::TREE_PARAM_ID]);
            }

            $result[] = array(
                RelationBuilder::TREE_PARAM_ID => $subArray[RelationBuilder::TREE_PARAM_ID], 
                RelationBuilder::TREE_PARAM_PARENT_ID => $parentId
            );

            $result = array_merge($result, $nested);
        }

        return $result;
    }
872747
public function addAction($parentId)
    {
        $models = $this->container->getParameter('fulgurio_light_cms.models');
        // We remove models if it s unique and there's one in database
        foreach ($models as $modelName => $model)
        {
            if ($model['is_unique'])
            {
                $em = $this->getDoctrine()->getManager();
                if ($em->getRepository('FulgurioLightCMSBundle:Page')->findOneBy(array('model' => $modelName)))
                {
                    unset($models[$modelName]);
                }
            }
        }
        $page = new Page();
        $parent = $this->getPage($parentId);
        if (!$models[$parent->getModel()]['allow_children'])
        {
            throw new AccessDeniedException();
        }
        $page->setParent($parent);
        return $this->createPage(
                $page,
                array('parent' => $parent),
                $models
        );
    }
739085
@UiThread
    public void expandParentRange(int startParentPosition, int parentCount) {
        int endParentPosition = startParentPosition + parentCount;
        for (int i = startParentPosition; i < endParentPosition; i++) {
            expandParent(i);
        }
    }
710032
public function convertObjectParentData(array $data = null)
    {
        if (empty($data)) {
            return null;
        }
        $parent = new ObjectParentData();

        $object = $this->convertObject($data[JSONConstants::JSON_OBJECTPARENTS_OBJECT] ?? null);
        if ($object !== null) {
            $parent->setObject($object);
        }

        $parent->setRelativePathSegment((string) ($data[JSONConstants::JSON_OBJECTPARENTS_RELATIVE_PATH_SEGMENT] ?? ''));
        $parent->setExtensions($this->convertExtension($data, JSONConstants::getObjectParentsKeys()));

        return $parent;
    }
1165529
public function setParentGridData($data = [])
    {
        $parentGridData = [];
        foreach ($data as $key => $value) {
            $parentGridData['parentgrid_' . $key] = $value;
        }
        return $parentGridData;
    }
1171037
protected function setAddonData(
        ItemInterface $lastProcessedProductItem,
        ItemInterface $item,
        ProductInterface $parentItemProduct = null
    ) {
        $item->setParent($lastProcessedProductItem);

        $parentProduct = $lastProcessedProductItem->getProduct();
        $addonProduct = $item->getProduct();
        /** @var Addon $addon */
        $addon = $this->addonRepository->findOneBy(['product' => $parentProduct, 'addon' => $addonProduct]);

        // Check if parent product has an addon relation.
        if (!$addon && $parentItemProduct) {
            $addon = $this->addonRepository->findOneBy(['product' => $parentProduct, 'addon' => $parentItemProduct]);
        }

        if (!$addon) {
            throw new \Exception(
                'Addon id ' . $addonProduct->getId() . ' for product id ' . $parentProduct->getId() . ' not found.'
            );
        }
        $item->setAddon($addon);

        return $addon;
    }
565429
@UiThread
    protected void parentExpandedFromViewHolder(int flatParentPosition) {
        ExpandableWrapper<P, C> parentWrapper = mFlatItemList.get(flatParentPosition);
        updateExpandedParent(parentWrapper, flatParentPosition, true);
    }