public function getidview() { switch ($this->type) { case 'left': return $this->leftview; case 'right': return $this->rightview; default: return parent::getidview(); } }