Beispiel #1
0
 public function process()
 {
     if (!$this->getSource()) {
         return $this->failure($this->modx->lexicon('permission_denied'));
     }
     $this->source->setRequestProperties($this->getProperties());
     $this->source->initialize();
     $success = $this->source->createContainer($this->getProperty('name'), $this->getProperty('parent'));
     if (empty($success)) {
         $msg = '';
         $errors = $this->source->getErrors();
         foreach ($errors as $k => $msg) {
             $this->modx->error->addField($k, $msg);
         }
         return $this->failure($msg);
     }
     return $this->success();
 }