Admin_ImageController::setAttachAction PHP Метод

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

public setAttachAction ( )
    public function setAttachAction()
    {
        $this->_helper->layout->disableLayout();
        try {
            $articleNumber = $this->_getParam('article_number');
            $imageId = $this->_getParam('image_id');
            //$image = $this->_helper->service('image')->find($imageId);
            //$articleImage = $this->_helper->service('image')->addArticleImage($articleNumber, $image);
            ArticleImage::AddImageToArticle($imageId, $articleNumber);
            $this->view->articleImages = $this->_helper->service('image')->findByArticle($this->_getParam('article_number'));
        } catch (\InvalidArgumentException $e) {
            $this->view->exception = $e->getMessage();
        }
    }