on entity factory and rest items controller On dev interface fixes PHP Parse error: syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM)

This commit is contained in:
weryques 2018-06-06 12:45:25 -03:00
parent d32cd3605e
commit 6859786e6f
2 changed files with 4 additions and 2 deletions

View File

@ -225,7 +225,8 @@ class REST_Items_Controller extends REST_Controller {
if ( isset($request['view_mode']) ) {
// TODO: Check if requested view mode is really enabled for current collection
$view_mode = \Tainacan\Theme_Helper::get_instance()->get_view_mode($request['view_mode']);
$view_mode = \Tainacan\Theme_Helper::get_instance();
$view_mode = $view_mode->get_view_mode($request['view_mode']);
if ($view_mode && $view_mode['type'] == 'template' && isset($view_mode['template']) && file_exists($view_mode['template'])) {
$return_template = true;

View File

@ -57,7 +57,8 @@ class Entity_Factory {
}
$this->entity = new $this->entity_type();
$this->repository = $this->repository_type::get_instance();
$repo = $this->repository_type;
$this->repository = $repo::get_instance();
if($publish) {
$this->entity->set_status('publish');