Returns the parent ContentSet in the same zone, false if it is not found.

@param  ContentSet           $contentSet

@return ContentSet|false
168423
public function getParentZoneAtSamePositionIfExists(ContentSet $contentSet)
    {
        $indexOfContent = $this->getContentSet()->indexOfByUid($contentSet, true);
        if (false === $indexOfContent) {
            return false;
        }

        $parent = $this->getParent();
        if (null === $parent) {
            return false;
        }

        $parentContentSet = $parent->getContentSet()->item($indexOfContent);
        if ($parentContentSet) {
            return $parentContentSet;
        }

        return false;
    }
1212366
private function getFilteredRows($resultSet)
    {
        $filtered = array();

        foreach ($resultSet as $row) {
            $filtered[] = $this->getFilteredRow($row);
        }

        return $filtered;
    }
390010
private function fetchSlots($templateContents)
    {
        $validAttributes = array(
            'repeated' => '',
            'blockType' => '',
            'htmlContent' => '',
            'blockDefinition' => ''
        );

        preg_match_all('/BEGIN-SLOT[^\w]*[\r\n](.*?)END-SLOT/si', $templateContents, $matches, PREG_SET_ORDER);
        $slots = array();
        foreach ($matches as $slotAttributes) {
            $attributes = "\n" . $slotAttributes[1];
            preg_match('/([\r\n][^\w]+)/', $attributes, $spacesMatch);
            $attributes = str_replace($spacesMatch[1], "\n", $attributes);

            try {
                $parsedAttributes = $this->ymlParser->parse($attributes);
                if ( ! array_key_exists('name', $parsedAttributes)) {
                    continue;
                }

                if ( array_key_exists('blockDefinition', $parsedAttributes)) {
                    $parsedAttributes['blockDefinition'] = json_encode($parsedAttributes['blockDefinition']);
                }
            } catch (ParseException $ex) {
                continue;
            }

            $slotName = $parsedAttributes['name'];
            unset($parsedAttributes['name']);
            $attributes = array_intersect_key($parsedAttributes, $validAttributes);
            $wrongAttributes = array_diff_key($parsedAttributes, $validAttributes);
            $slots[$slotName] = $attributes;
            if (count($wrongAttributes) > 0) {
                $slots[$slotName]['errors'] = $wrongAttributes;
            }
        }

        return $slots;
    }
903744
public function findPagesByContent($content)
    {
        $contentUids = array_merge($this->getContentsParentUids($content->getUid()), [$content->getUid()]);
        $contentUids = implode(', ', array_unique(array_map(function ($uid) {
            return '"'.$uid.'"';
        }, $contentUids)));

        $pageUids = $this->_em->getConnection()->executeQuery(
            sprintf('SELECT uid FROM page WHERE contentset IN (%s)', $contentUids)
        )->fetchAll(\PDO::FETCH_COLUMN);

        return $this->_em->createQueryBuilder('p')
            ->select('p')
            ->from('BackBee\NestedNode\Page', 'p')
            ->where('p._uid IN (:uids)')
            ->setParameter('uids', $pageUids)
            ->getQuery()
            ->getResult()
        ;
    }
671571
public function getChildren($includeDeleted = false)
    {
        if ($includeDeleted) {
            return $this->children;
        }

        return $this->children->filter(function (Folder $entry) {
            if ($entry->isDeleted()) {
                return false;
            }

            return true;
        });
    }
650031
public function getChilds($idParent)
    {
        if ($childs = $this->qb
            ->from($this->table)
            ->where($this->parentKey, $idParent)
            ->get()) {
            if ($childs->count() > 0) {
                return $childs;
            }
        }

        return false;
    }
243126
static function FindContentGroup(Content $content)
    {
        $result = null;
        $currContent = $content;
        do
        {
            $result = $currContent->GetUserGroup();
            $currContent = ContentTreeUtil::ParentOf($currContent);
        } 
        while (!$result && $currContent);
        if ($result)
        {
            return $result;
        }
        return self::GetUpperContentGroup($content);
    }
460168
public static function get_Inet( &$inet )
    {
        if( $inet instanceof Inet ) {
            return $inet;
        }
        return !is_null($inet)
            ? new Inet($inet)
            : null
            ;
    }
1255195
public function getColumnByOffset($pColumnOffset = 0) {
		list($rangeStart,$rangeEnd) = PHPExcel_Cell::rangeBoundaries($this->_range);
		$pColumn = PHPExcel_Cell::stringFromColumnIndex($rangeStart[0] + $pColumnOffset - 1);

		return $this->getColumn($pColumn);
	}
139717
protected function replaceParentBlock($savedContent)
    {
       $pattern = sprintf(self::TMPL_RENDER_PARENT, "([^']+)", "([^|]+)");
       $result = preg_match("/{$pattern}/", $savedContent, $matches);
       if (!$result) {
           return $savedContent;
       } else { // processing parentBlock()
           $fullBlockName = $matches[1];
           $viewFileName = $matches[2];
           $replacement = $this->findParentBlock($fullBlockName, $viewFileName);
           $out = preg_replace("/{$pattern}/", $replacement, $savedContent);
           return $out;
       }
    }
471188
protected function getContent($path)
    {
        if (null === self::$root) {
            return null;
        }

        if (self::$root->getName() === $path) {
            return self::$root;
        }

        if (self::$root->hasChild($path) === true) {
            return self::$root->getChild($path);
        }

        return null;
    }
8708
private function resolveContentSet(ContentSet $content, array $matches)
    {
        if ('ContentSet' === $matches[1]) {
            return $content->item($matches[3]);
        }

        $index = intval($matches[3]);
        $classname = AbstractClassContent::getFullClassname(str_replace('/', NAMESPACE_SEPARATOR, $matches[1]));

        foreach ($content as $subcontent) {
            if (get_class($subcontent) !== $classname) {
                continue;
            }

            if (0 === $index) {
                return $subcontent;
            }

            $index--;
        }

        return $content;
    }
851923
public function getPrevious()
    {
        $prev = $this;
        $find = false;
        if (!is_null($this->parent)) {
            foreach ($this->parent->content as $c) {
                if ($c === $this) {
                    $find=true;
                    break;
                }
                if (!$find) {
                    $prev = $c;
                }
            }
        }
        return $prev;
    }
887806
private function getCachedContent()
    {
        $item = null;

        if (null !== $this->cache) {
            $item = $this->cache->getItem($this->cacheKey);
            $cacheContent = $item->get();

            if ($item->isHit() && null !== $cacheContent) {
                $this->contentCache = $cacheContent;
            }
        }

        return $item;
    }
433974
public function get_parent_context() {
        if (empty($this->_path) or $this->_id == SYSCONTEXTID) {
            return false;
        }

        $parentcontexts = trim($this->_path, '/'); // kill leading slash
        $parentcontexts = explode('/', $parentcontexts);
        array_pop($parentcontexts); // self
        $contextid = array_pop($parentcontexts); // immediate parent

        return context::instance_by_id($contextid, MUST_EXIST);
    }
77756
function contentStructureTree( $rootNodeID, $classFilter, $maxDepth, $maxNodes, $sortArray, $fetchHidden, $unfoldNodeID )
    {
        $contentTree = eZContentStructureTreeOperator::initContentStructureTree( $rootNodeID, $fetchHidden, $classFilter );

        // if root node is invisible then no point to fetch children
        //if ( count( $contentTree ) == 0 )
        //    return $contentTree;

        if ( $contentTree === false)
            return $contentTree;

        $nodesLeft = $maxNodes - 1;
        $depthLeft = $maxDepth - 1;

        eZContentStructureTreeOperator::children( $contentTree, $classFilter, $depthLeft, $nodesLeft, $sortArray, $fetchHidden, $unfoldNodeID );

        return $contentTree;
    }
953744
public function getParentByClass($cls)
    {
        if (!is_array($cls)) $cls = array($cls);
        $d = $this;
        while ($d) {
            foreach ($cls as $i) {
                if (is_instance_of($d->componentClass, $i)) {
                    return $d;
                }
            }
            $d = $d->parent;
        }
        return $d;
    }