Get the cached output of the block instance (if available and not expired).

@param \Concrete\Core\Area\Area|null $area

@return string|false
961128
public function getBlockCachedOutput($area)
    {
        $db = Loader::db();

        $arHandle = $this->getAreaHandle();
        if ($this->isBlockInStack() && is_object($area)) {
            $arHandle = $area->getAreaHandle();
            $cx = Page::getCurrentPage();
            $cID = $cx->getCollectioniD();
            $cvID = $cx->getVersionID();
        } else {
            $c = $this->getBlockCollectionObject();
            $cID = $c->getCollectionID();
            $cvID = $c->getVersionID();
        }

        $r = $db->GetRow(
            'select btCachedBlockOutput, btCachedBlockOutputExpires from CollectionVersionBlocksOutputCache where cID = ? and cvID = ? and bID = ? and arHandle = ? ',
            [
                $cID,
                $cvID,
                $this->getBlockID(),
                $arHandle,
            ]
            );

        if (array_get($r, 'btCachedBlockOutputExpires') < time()) {
            return false;
        }

        return $r['btCachedBlockOutput'];
    }
1176789
public static function exists($path, $area = null)
	{
		$path = rtrim(static::instance($area)->get_path($path), '\\/');

		// resolve symlinks
		while ($path and is_link($path))
		{
			$path = readlink($path);
		}

		return is_file($path);
	}
281340
protected function Area()
    {
        if (!$this->area) {
            $this->area = new Area(Request::GetData('area'));
        }
        return $this->area;
    }
932709
public function is_empty_area() {
        if ($child = $this->get_area_backup(0, '/', '.')) {
            if (!$child->is_empty_area()) {
                return false;
            }
        }
        if ($child = $this->get_area_intro(0, '/', '.')) {
            if (!$child->is_empty_area()) {
                return false;
            }
        }

        foreach ($this->areas as $area=>$desctiption) {
            if ($child = $this->get_file_info('mod_'.$this->modname, $area, null, null, null)) {
                if (!$child->is_empty_area()) {
                    return false;
                }
            }
        }

        return true;
    }
980098
public function findByArea($area)
    {
        $qb = $this->getQueryBuilder();
        $qb
            ->addSelect("fb_fa")
            ->addSelect("fb_fa_f")
            ->innerJoin("fb.filterAddeds", "fb_fa")
            ->innerJoin("fb_fa.filter", "fb_fa_f")
            ->andWhere("fb.area = :area")
            ->setParameter("area", $area)
            ;
        $qb
            ->orderBy("fb.orderBlock","ASC")
            ->addOrderBy("fb_fa.orderFilter","ASC")
            ;
        return $qb->getQuery()->getResult();
    }
378823
public static function get_search_area($areaid) {

        // We have them all here.
        if (!empty(static::$allsearchareas[$areaid])) {
            return static::$allsearchareas[$areaid];
        }

        $classname = static::get_area_classname($areaid);

        if (class_exists($classname) && static::is_search_area($classname)) {
            return new $classname();
        }

        return false;
    }
1061146
private function getRecomId($content_area)
    {
        $id = $content_area->find('a', 0)->href;
        $id = explode('/', $id);

        return $id[4];
    }
949619
public function getArea($name)
    {
        foreach ($this->areas as $area) {
            /** @var Area $area */
            if ($area->getName() == $name) {
                return $area;
            }
        }

        return;
    }
1032247
protected function canView($area)
    {
        $notifierController = singleton('Milkyway\\SS\\FlashMessage\\Controller');

        if(Control::curr() instanceof $notifierController) {
            return true;
        }

        $mapping = (array)singleton('env')->get('messages.mapping');

        if (isset($mapping[$area])) {
            $allowed = array_filter((array)$mapping[$area]);

            foreach ($allowed as $controller) {
                if (is_a(Control::curr(), $controller)) {
                    return true;
                }
            }

            return false;
        }

        return true;
    }
1155573
public function postConfiguration($area)
    {
        $area = app(AreaManager::class)->getById($area);

        return $this->processor->markAsConfigured($this, $area);
    }
732844
public function getCustomStyleSetID()
    {
        $db = Loader::db();
        if (!isset($this->issID)) {
            $co = $this->getBlockCollectionObject();

            $arHandle = $this->getAreaHandle();
            if ($arHandle) {
                $a = $this->getBlockAreaObject();
                if ($a->isGlobalArea()) {
                    // then we need to check against the global area name. We currently have the wrong area handle passed in
                    $arHandle = STACKS_AREA_NAME;
                }

                $v = [
                    $co->getCollectionID(),
                    $co->getVersionID(),
                    $arHandle,
                    $this->getBlockID(),
                ];

                $this->issID = (int) $db->GetOne(
                    'select issID from CollectionVersionBlockStyles where cID = ? and cvID = ? and arHandle = ? and bID = ?',
                    $v
                );
            } else {
                $this->issID = 0;
            }
        }

        return $this->issID;
    }
884662
private function getId($name_area)
    {
        $temp_id = $name_area->find('a', 0)->href;
        $temp_id = explode('=', $temp_id);

        return $temp_id[1];
    }
234539
public function setBlockAreaObject(&$a)
    {
        $this->a = $a;
        $this->arHandle = $a ? $a->getAreaHandle() : null;
    }
786575
public function get($key)
    {
        $context = $this->_context;

        if ($context->cache !== null && array_key_exists($key, $context->cache)) {
            return $context->cache[$key];
        } elseif ($this->_enabled) {
            if ($this->_is_cli) {
                if (($r = apcu_fetch($this->_prefix ? ($this->_prefix . $key) : $key)) === false) {
                    return false;
                }
                return time() <= $r[0] ? $r[1] : false;
            } else {
                return apcu_fetch($this->_prefix ? ($this->_prefix . $key) : $key);
            }
        } else {
            return false;
        }
    }
835263
public function getArea($name)
    {
        if(null === $this->areas)
        {
            $this->areas = array();

            $this->scanAreas($this->contentPath . $this->getNode()->getUri());
        }

        return array_key_exists($name, $this->areas) ? $this->areas[$name] : null;
    }
1160647
public function hasCage(string $area, int $level = 0, bool $activeOnly = true) : ?Model
    {
        $cages = $activeOnly ? $this->getActiveCages() : $this->allCages;

        foreach ($cages as $index => $cage) {
            if ($cage->area === $area && $cage->level >= $level) {
                return $cage;
            }
        }

        return null;
    }
369871
function GrantAddContentToLayoutArea(Area $area)
    {
        $result = $this->Grant(BackendAction::Create(), $area);
        if (!$result->ToBool())
        {
            return $result;
        }
        return $this->GrantAddContentToLayout($area->GetLayout());
    }