public function findOrCreate($page_id, DeviceType $DeviceType) { if (is_null($page_id)) { $PageLayout = $this->newPageLayout($DeviceType); return $PageLayout; } else { return $this->get($DeviceType, $page_id); } }