createFolder() public method

Create folder
public createFolder ( string $name ) : void
$name string
return void
Ejemplo n.º 1
0
 public function createFolderAction()
 {
     $path = $this->parsePath();
     $name = $this->formatName($this->_getParam('name'));
     try {
         $this->service->createFolder(ltrim("{$path}/{$name}", ' /'));
         $this->_helper->flashMessenger(getGS("Directory '\$1' created.", $name));
     } catch (\InvalidArgumentException $e) {
         $this->_helper->flashMessenger(array('error', $e->getMessage()));
     }
     $this->_redirect(urldecode($this->_getParam('next')), array('prependBase' => false));
 }
Ejemplo n.º 2
0
 public function createFolderAction()
 {
     $translator = \Zend_Registry::get('container')->getService('translator');
     $path = $this->parsePath();
     $name = $this->formatName($this->_getParam('name'));
     try {
         $this->service->createFolder(ltrim("{$path}/{$name}", ' /'));
         $this->_helper->flashMessenger($translator->trans("Directory \$1 created.", array('$1' => $name), 'themes'));
     } catch (\InvalidArgumentException $e) {
         $this->_helper->flashMessenger(array('error', $e->getMessage()));
     }
     $this->_redirect(urldecode($this->_getParam('next')), array('prependBase' => false));
 }