public function isOnView($view)
    {
        $view = ucfirst(strtolower($view));

        if (in_array($view, ['Form', 'Index', 'Show'])) {
            return $this->{'isOn' . $view . 'View'};
        }

        return false;
    }
public function isOnView($view)
    {
        $view = ucfirst(strtolower($view));

        if (in_array($view, ['Form', 'Index', 'Show'])) {
            return $this->{'isOn' . $view . 'View'};
        }

        return false;
    }
public function isOnView ( $ view ) { $ view = ucfirst ( strtolower ( $ view ) ) ; if ( in_array ( $ view , [ 'Form' , 'Index' , 'Show' ] ) ) { return $ this -> { 'isOn' . $ view . 'View' } ; } return false ; }
Checks if the field is on a given view.

@return bool
Checks if the field is on a given view .