public function create(View $view)
    {
        $params   = [
            View::ENTRY_NAME       => $view->getName(),
            View::ENTRY_TYPE       => $view->getType(),
        ];
        $url      = Urls::URL_VIEW;
        $response = $this->getConnection()->post($url, $this->json_encode_wrapper($params));
        $json     = $response->getJson();
        $view->setId($json[View::ENTRY_ID]);

        return $view->getAll();
    }
public function create(View $view)
    {
        $params   = [
            View::ENTRY_NAME       => $view->getName(),
            View::ENTRY_TYPE       => $view->getType(),
        ];
        $url      = Urls::URL_VIEW;
        $response = $this->getConnection()->post($url, $this->json_encode_wrapper($params));
        $json     = $response->getJson();
        $view->setId($json[View::ENTRY_ID]);

        return $view->getAll();
    }
public function create ( View $ view ) { $ params = [ View :: ENTRY_NAME => $ view -> getName ( ) , View :: ENTRY_TYPE => $ view -> getType ( ) , ] ; $ url = Urls :: URL_VIEW ; $ response = $ this -> getConnection ( ) -> post ( $ url , $ this -> json_encode_wrapper ( $ params ) ) ; $ json = $ response -> getJson ( ) ; $ view -> setId ( $ json [ View :: ENTRY_ID ] ) ; return $ view -> getAll ( ) ; }
Create a view

This will create a view using the given view object and return an array of the created view object's attributes.<br><br>

@throws Exception

@param View $view - The view object which holds the information of the view to be created

@return array
@since   3.4
Create a view