/** * On update, make sure layout is set if its not an external link */ public function update() { // Make sure a layout is set if this isn't an external link if (!$this->islink and empty($this->layout->id)) { throw new Kohanut_Exception("You must select a layout for a page that is not an external link."); } parent::update(); }