public function createNewExhibit($isPublic, $isFeatured, $title, $description, $credits, $slug = '') { $exhibit = new Exhibit(); $exhibit->public = $isPublic ? 1 : 0; $exhibit->featured = $isFeatured ? 1 : 0; $exhibit->title = $title; $exhibit->description = $description; $exhibit->credits = $credits; if ($slug != '') { $exhibit->slug = $slug; } $exhibit->save(); return $exhibit; }
/** * Create an exhibit. * * @param boolean $public True if the exhibit is public. * @param string $title The exhibit title. * @param string $slug The exhibit slug. * @return Exhibit */ protected function _exhibit($public = true, $title = 'Test Title', $slug = 'test-slug') { $exhibit = new Exhibit(); $exhibit->public = $public; $exhibit->slug = $slug; $exhibit->title = $title; $exhibit->save(); return $exhibit; }