Admin_ImageController::setRenditionAction PHP Метод

setRenditionAction() публичный Метод

public setRenditionAction ( )
    public function setRenditionAction()
    {
        $translator = \Zend_Registry::get('container')->getService('translator');
        $this->_helper->layout->disableLayout();
        try {
            $rendition = $this->_helper->service('image.rendition')->getRendition($this->_getParam('rendition'));
            $image = $this->_helper->service('image')->getArticleImage($this->_getParam('article_number'), array_pop(explode('-', $this->_getParam('image'))));
            $articleRendition = $this->_helper->service('image.rendition')->setArticleRendition($this->_getParam('article_number'), $rendition, $image->getImage());
            $this->view->rendition = $this->view->rendition($rendition, $this->view->previewWidth, $this->view->previewHeight, $articleRendition);
        } catch (\InvalidArgumentException $e) {
            $this->view->exception = sprintf($translator->trans('Sorry that image is too small. Image needs to be at least %dx%d.', array(), 'article_images'), $rendition->getWidth(), $rendition->getHeight());
        }
    }