@param string|ContentInterface $content
@param ContentInterface        $child

@return bool
546693
public function isParentOf($content, ContentInterface $child)
    {
        if ($child instanceof Template) {
            return false;
        }

        if (is_string($content)) {
            // Strip the dev front controller if its defined
            if (strpos($content, '/app_dev.php') !== false) {
                $content = substr($content, strlen('/app_dev.php'));
            }

            // Strip the first character if it's a slash
            if (substr($content, 0, 1) === '/') {
                $content = ltrim($content, '/');
            }

            if (substr($child->getSlug(), 0, strlen($content)) === $content) {
                return true;
            }
        } else {
            if ($child->getId() == $content->getId()) {
                return true;
            }
        }

        return false;
    }
423651
public static function isBeneath(string $child, string $parent)
    {
        if ((strlen($child) >= strlen($parent))
            && strpos($child, $parent) === 0) {
                return true;
        }

        return false;
    }
825705
protected function takeChildFromDOM($child)
    {
        $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
        switch ($absoluteNodeName) {
        case $this->lookupNamespace('gCal') . ':' . 'webContent':
            $webContent = new Zend_Gdata_Calendar_Extension_WebContent();
            $webContent->transferFromDOM($child);
            $this->_webContent = $webContent;
            break;
        default:
            parent::takeChildFromDOM($child);
            break;
        }
    }
461158
public function renderAction(ComponentInterface $component, ContentInterface $content)
    {
        $menu = array();
        foreach ($component->getData('tree', array()) as $linkData) {
            // name / url required
            if (empty($linkData['name']) || empty($linkData['url'])) {
                continue;
            }
            $menu[$linkData['name']] = array(
                'url' => $linkData['url'],
                'children' => array(),
            );
        }

        return $this->get('synapse')
            ->createDecorator($component)
            ->decorate(array(
                'content' => $content,
                'menu' => $menu,
            ))
        ;
    }
1121481
public function addChild(Content $child)
    {
        $this->pages[$child->id] = $child;

        // Group by category
        if (!isset($this->categories[$child->category])) {
            $this->categories[$child->category] = [];
        }

        // Add post to category
        $this->categories[$child->category][] = $child;
    }
276237
protected function takeChildFromDOM($child)
    {
        $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;
        switch ($absoluteNodeName) {
        case $this->lookupNamespace('gd') . ':' . 'feedLink':
            $feedLink = new Zend_Gdata_Extension_FeedLink();
            $feedLink->transferFromDOM($child);
            $this->_feedLink[] = $feedLink;
            break;
        case $this->lookupNamespace('media') . ':' . 'thumbnail':
            $mediaThumbnail = new Zend_Gdata_Media_Extension_MediaThumbnail();
            $mediaThumbnail->transferFromDOM($child);
            $this->_mediaThumbnail = $mediaThumbnail;
            break;
        case $this->lookupNamespace('yt') . ':' . 'countHint':
            $countHint = new Zend_Gdata_YouTube_Extension_CountHint();
            $countHint->transferFromDOM($child);
            $this->_countHint = $countHint;
            break;
        case $this->lookupNamespace('yt') . ':' . 'playlistTitle':
            $playlistTitle = new Zend_Gdata_YouTube_Extension_PlaylistTitle();
            $playlistTitle->transferFromDOM($child);
            $this->_playlistTitle = $playlistTitle;
            break;
        case $this->lookupNamespace('yt') . ':' . 'playlistId':
            $playlistId = new Zend_Gdata_YouTube_Extension_PlaylistId();
            $playlistId->transferFromDOM($child);
            $this->_playlistId = $playlistId;
            break;
        case $this->lookupNamespace('yt') . ':' . 'queryString':
            $queryString = new Zend_Gdata_YouTube_Extension_QueryString();
            $queryString->transferFromDOM($child);
            $this->_queryString = $queryString;
            break;
        case $this->lookupNamespace('yt') . ':' . 'username':
            $username = new Zend_Gdata_YouTube_Extension_Username();
            $username->transferFromDOM($child);
            $this->_username = $username;
            break;
        default:
            parent::takeChildFromDOM($child);
            break;
        }
    }
364599
public function hasContent(?string $contentType = null, ?string $contentKey = null): bool
    {
        return isset($this->content[$contentType][$contentKey]);
    }
347048
public function includeChildren(Content $content)
    {
        if ($content->isChildrenLoaded()) {
            return $this->collection($content->children, new ContentTransformer()); // We don't want LAZY LOADING !
        }
        return null;
    }
55231
protected function takeChildFromDOM($child)
    {
        $absoluteNodeName = $child->namespaceURI . ':' . $child->localName;

        switch ($absoluteNodeName) {
            case $this->lookupNamespace('gphoto') . ':' . 'weight';
                $weight = new Zend_Gdata_Photos_Extension_Weight();
                $weight->transferFromDOM($child);
                $this->_gphotoWeight = $weight;
                break;
            default:
                parent::takeChildFromDOM($child);
                break;
        }
    }
90441
public function hasFieldType(ContentType $contentType, string $fieldTypeIdentifier): bool
    {
        foreach ($contentType->getFieldDefinitions() as $fieldDefinition) {
            if ($fieldDefinition->fieldTypeIdentifier === $fieldTypeIdentifier) {
                return true;
            }
        }

        return false;
    }
1289158
public function hasChild($id)
    {
        foreach ($this->children as $child) {
            if ($child->getId() == $id) {
                return true;
            }

            return $child->hasChild($id);
        }

        return false;
    }
896671
public function removeChild(string $childId, bool $setParent = true): NodeInterface
    {
        if ($this->hasChild($childId)) {
            $child = $this->getChild($childId);

            if ($setParent) {
                $child->removeParent($this->getId(), false);
            }

            unset($this->_children[$childId]);

            $this->notifySubscribers(
                self::EVENT_REMOVE_CHILD,
                ['parent' => $this, 'child' => $child]
            );

            /** @var NodeInterface $parent */
            foreach ($this->getAllParents() as $parent) {
                $child->removeSubscriber($parent->getId());
            }
        }

        return $this;
    }
407050
protected function setModelValueFromElement(ElementInterface $child)
    {
        $propertyPath = $child->getPropertyPath();
        
        if ($propertyPath instanceof PropertyPathInterface) {
            if ($this->propertyAccessor->isWritable($this->data, $propertyPath)) {
                if ($child->hasTransformer()) {
                    $transformer = $child->getTransformer();
                    $transformer->reverseTransform($this->data, $propertyPath, $child->getValue());
                } else {
                    $this->propertyAccessor->setValue($this->data, $propertyPath, $child->getValue());
                }
            }
        }
    }
224914
public static function setContextDataByChildKey(string $key, string $child, $val)
    {
        $coroutineId = self::getCoroutineId();
        self::$context[$coroutineId][self::DATA_KEY][$key][$child] = $val;
    }
548539
public function addChild(EntityInterface $child, $position = null, $returnChild = false)
    {
        if ($this->exists) {
            if (is_null($position)) {
                $position = $this->getNextAfterLastPosition($this->getKey());
            }

            $child->moveTo($position, $this);
        }

        return ($returnChild === true ? $child : $this);
    }
148396
private function isSelectable(Content $content): bool
    {
        if (!$this->config->hasParameter('allowed_content_types')) {
            return true;
        }

        if ($this->allowedContentTypeIds === null) {
            $this->allowedContentTypeIds = [];

            $allowedContentTypes = $this->config->getParameter('allowed_content_types');
            if (is_string($allowedContentTypes) && $allowedContentTypes !== '') {
                $allowedContentTypes = array_map('trim', explode(',', $allowedContentTypes));
                $this->allowedContentTypeIds = $this->getContentTypeIds($allowedContentTypes);
            }
        }

        if (count($this->allowedContentTypeIds) === 0) {
            return true;
        }

        return in_array($content->contentInfo->contentTypeId, $this->allowedContentTypeIds, true);
    }
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;
        }
    }