public function getActiveEnd($page) { if (!property_exists($page, 'active_to')) { return new \DateTime(); } return new \DateTime($page->active_to); }