protected function registerPosttype()
    {
        if (! $this->isRegistered()) {
            $parameters = array_merge(
                ['labels' => $this->model->getLabels()],
                $this->model->getArguments()
            );

            return register_post_type($this->model->getSlug(), $parameters);
        }

        throw new PosttypeException("Posttype [{$this->model->getSlug()}] already exsist.");
    }
protected function registerPosttype()
    {
        if (! $this->isRegistered()) {
            $parameters = array_merge(
                ['labels' => $this->model->getLabels()],
                $this->model->getArguments()
            );

            return register_post_type($this->model->getSlug(), $parameters);
        }

        throw new PosttypeException("Posttype [{$this->model->getSlug()}] already exsist.");
    }
protected function registerPosttype ( ) { if ( ! $ this -> isRegistered ( ) ) { $ parameters = array_merge ( [ 'labels' => $ this -> model -> getLabels ( ) ] , $ this -> model -> getArguments ( ) ) ; return register_post_type ( $ this -> model -> getSlug ( ) , $ parameters ) ; } throw new PosttypeException ( "Posttype [{$this->model->getSlug()}] already exsist." ) ; }
Register posttype.

@return object|\WP_Error
Register posttype .