protected function getContentObject(array $contenttype, array $values)
    {
        if (empty($contenttype['class'])) {
            return new Content($this->app, $contenttype, $values);
        }

        if (class_exists($contenttype['class'])) {
            $content = new $contenttype['class']($this->app, $contenttype, $values);

            if (!($content instanceof Content)) {
                throw new StorageException($contenttype['class'] . ' does not extend \\Bolt\\Content.');
            }

            return $content;
        }

        $msg = sprintf('The ContentType %s has an invalid class specified "%s". Unable to log the changes to its records', $contenttype['slug'], $contenttype['class']);
        $this->app['logger.system']->error($msg, ['event' => 'content']);

        throw new StorageException($msg);
    }
protected function getContentObject(array $contenttype, array $values)
    {
        if (empty($contenttype['class'])) {
            return new Content($this->app, $contenttype, $values);
        }

        if (class_exists($contenttype['class'])) {
            $content = new $contenttype['class']($this->app, $contenttype, $values);

            if (!($content instanceof Content)) {
                throw new StorageException($contenttype['class'] . ' does not extend \\Bolt\\Content.');
            }

            return $content;
        }

        $msg = sprintf('The ContentType %s has an invalid class specified "%s". Unable to log the changes to its records', $contenttype['slug'], $contenttype['class']);
        $this->app['logger.system']->error($msg, ['event' => 'content']);

        throw new StorageException($msg);
    }
protected function getContentObject ( array $ contenttype , array $ values ) { if ( empty ( $ contenttype [ 'class' ] ) ) { return new Content ( $ this -> app , $ contenttype , $ values ) ; } if ( class_exists ( $ contenttype [ 'class' ] ) ) { $ content = new $ contenttype [ 'class' ] ( $ this -> app , $ contenttype , $ values ) ; if ( ! ( $ content instanceof Content ) ) { throw new StorageException ( $ contenttype [ 'class' ] . ' does not extend \\Bolt\\Content.' ) ; } return $ content ; } $ msg = sprintf ( 'The ContentType %s has an invalid class specified "%s". Unable to log the changes to its records' , $ contenttype [ 'slug' ] , $ contenttype [ 'class' ] ) ; $ this -> app [ 'logger.system' ] -> error ( $ msg , [ 'event' => 'content' ] ) ; throw new StorageException ( $ msg ) ; }
Get the content object.

@deprecated Deprecated since 3.3. To be removed in v4.

@param array $contenttype
@param array $values

@throws StorageException

@return Content
Get the content object .