Beispiel #1
0
 /**
  * Handle the command.
  */
 public function handle()
 {
     if (!$this->page->isEnabled()) {
         $path = 'pages/preview/' . $this->page->getStrId();
     } else {
         if ($parent = $this->page->getParent()) {
             $path = $parent->getPath() . '/' . $this->page->getSlug();
         } elseif ($this->page->isHome()) {
             $path = '/';
         } else {
             $path = '/' . $this->page->getSlug();
         }
     }
     $this->page->setAttribute('path', $path);
 }
Beispiel #2
0
 /**
  * Handle the command.
  */
 public function handle()
 {
     if (!$this->page->getStrId()) {
         $this->page->str_id = str_random(24);
     }
 }