public function getClosestPageIdWithActiveTemplate($startPageId)
    {
        if ($startPageId === 0) {
            return 0;
        }

        $cacheId = 'ConfigurationPageResolver' . '_' . 'getClosestPageIdWithActiveTemplate' . '_' . $startPageId;
        $methodResult = $this->runtimeCache->get($cacheId);
        if (!empty($methodResult)) {
            return $methodResult;
        }

        $methodResult = $this->calculateClosestPageIdWithActiveTemplate($startPageId);
        $this->runtimeCache->set($cacheId, $methodResult);

        return $methodResult;
    }
public function getClosestPageIdWithActiveTemplate($startPageId)
    {
        if ($startPageId === 0) {
            return 0;
        }

        $cacheId = 'ConfigurationPageResolver' . '_' . 'getClosestPageIdWithActiveTemplate' . '_' . $startPageId;
        $methodResult = $this->runtimeCache->get($cacheId);
        if (!empty($methodResult)) {
            return $methodResult;
        }

        $methodResult = $this->calculateClosestPageIdWithActiveTemplate($startPageId);
        $this->runtimeCache->set($cacheId, $methodResult);

        return $methodResult;
    }
public function getClosestPageIdWithActiveTemplate ( $ startPageId ) { if ( $ startPageId === 0 ) { return 0 ; } $ cacheId = 'ConfigurationPageResolver' . '_' . 'getClosestPageIdWithActiveTemplate' . '_' . $ startPageId ; $ methodResult = $ this -> runtimeCache -> get ( $ cacheId ) ; if ( ! empty ( $ methodResult ) ) { return $ methodResult ; } $ methodResult = $ this -> calculateClosestPageIdWithActiveTemplate ( $ startPageId ) ; $ this -> runtimeCache -> set ( $ cacheId , $ methodResult ) ; return $ methodResult ; }
This method fetches the rootLine and calculates the id of the closest template in the rootLine.
The result is stored in the runtime cache.

@param integer $startPageId
@return integer
This method fetches the rootLine and calculates the id of the closest template in the rootLine . The result is stored in the runtime cache .