Example #1
0
 function postContent()
 {
     $this->createGatekeeper();
     $new = false;
     if (!empty($this->arguments)) {
         $object = \IdnoPlugins\Sketch\Sketch::getByID($this->arguments[0]);
     }
     if (empty($object)) {
         $object = new \IdnoPlugins\Sketch\Sketch();
     }
     if ($object->saveDataFromInput($this)) {
         $this->forward(\Idno\Core\site()->config()->getDisplayURL() . 'content/all/');
         //$this->forward($object->getDisplayURL());
     }
 }
Example #2
0
 function getContent()
 {
     $this->createGatekeeper();
     // This functionality is for logged-in users only
     // Are we loading an entity?
     if (!empty($this->arguments)) {
         $object = \IdnoPlugins\Sketch\Sketch::getByID($this->arguments[0]);
     } else {
         // TODO 404
         $this->forward();
     }
     $t = \Idno\Core\site()->template();
     $body = $t->__(array('object' => $object))->draw('entity/Status/delete');
     if (!empty($this->xhr)) {
         echo $body;
     } else {
         $t->__(array('body' => $body, 'title' => "Delete " . $object->getTitle()))->drawPage();
     }
 }