public function isInsideOfPortal() { $blocks = $this->getBlocksAround(); foreach ($blocks as $block) { if ($block instanceof Portal) { return true; } } return false; }