src/ScContent/Controller/Back/CategoryController.php
public function addAction()
    {
        $parent = $this->params()->fromRoute('parent');
        if (! is_numeric($parent)) {
            $this->flashMessenger()->addMessage(
                $this->scTranslate('The category location was not specified.')
            );
            return $this->redirect()
                ->toRoute('sc-admin/content-manager')
                ->setStatusCode(303);
        }
        try {
            $categoryId = $this->getCategoryService()->makeCategory($parent);
        } catch (RuntimeException $e) {
            $this->flashMessenger()->addMessage($e->getMessage());
            return $this->redirect()
                ->toRoute('sc-admin/content-manager')
                ->setStatusCode(303);
        }
        return $this->redirect()->toRoute(
            'sc-admin/category/edit',
            ['id' => $categoryId]
        );
    }
public function addAction()
    {
        $parent = $this->params()->fromRoute('parent');
        if (! is_numeric($parent)) {
            $this->flashMessenger()->addMessage(
                $this->scTranslate('The category location was not specified.')
            );
            return $this->redirect()
                ->toRoute('sc-admin/content-manager')
                ->setStatusCode(303);
        }
        try {
            $categoryId = $this->getCategoryService()->makeCategory($parent);
        } catch (RuntimeException $e) {
            $this->flashMessenger()->addMessage($e->getMessage());
            return $this->redirect()
                ->toRoute('sc-admin/content-manager')
                ->setStatusCode(303);
        }
        return $this->redirect()->toRoute(
            'sc-admin/category/edit',
            ['id' => $categoryId]
        );
    }
public function addAction ( ) { $ parent = $ this -> params ( ) -> fromRoute ( 'parent' ) ; if ( ! is_numeric ( $ parent ) ) { $ this -> flashMessenger ( ) -> addMessage ( $ this -> scTranslate ( 'The category location was not specified.' ) ) ; return $ this -> redirect ( ) -> toRoute ( 'sc-admin/content-manager' ) -> setStatusCode ( 303 ) ; } try { $ categoryId = $ this -> getCategoryService ( ) -> makeCategory ( $ parent ) ; } catch ( RuntimeException $ e ) { $ this -> flashMessenger ( ) -> addMessage ( $ e -> getMessage ( ) ) ; return $ this -> redirect ( ) -> toRoute ( 'sc-admin/content-manager' ) -> setStatusCode ( 303 ) ; } return $ this -> redirect ( ) -> toRoute ( 'sc-admin/category/edit' , [ 'id' => $ categoryId ] ) ; }
Add Category.

@return \Zend\Stdlib\ResponseInterface
Add Category .