loadView('snippets/part-comparer'); return __('ShortPixel Compression','shortpixel-image-optimiser'); } public function loadItem( $nextGenObj ) { $this->view = new \stdClass; // reset every row $otherMediaController = OtherMediaController::getInstance(); $mediaItem = $otherMediaController->getCustomImageByPath($nextGenObj->imagePath); $this->view->mediaItem = $mediaItem; $this->view->id = $mediaItem->get('id'); $this->view->text = UiHelper::getStatusText($mediaItem); $this->view->list_actions = UiHelper::getListActions($mediaItem); if ( count($this->view->list_actions) > 0) $this->view->list_actions = UiHelper::renderBurgerList($this->view->list_actions, $mediaItem); else $this->view->list_actions = ''; $this->view->actions = UiHelper::getActions($mediaItem); //$this->view->actions = $actions; if (! $this->userIsAllowed) { $this->view->actions = array(); $this->view->list_actions = ''; } $this->loadView($this->template, false); } } // class