コード例 #1
0
ファイル: Page.php プロジェクト: ngocanh/pimcore
 /**
  * @see Document::delete and Document_PageSnippet::delete
  * @return void
  */
 public function delete()
 {
     if ($this->getId() == 1) {
         throw new Exception("root-node cannot be deleted");
     }
     parent::delete();
 }
コード例 #2
0
ファイル: Page.php プロジェクト: shanky0110/pimcore-custom
 /**
  *
  */
 public function getFullPath()
 {
     $path = parent::getFullPath();
     if (!Pimcore::inAdmin()) {
         // check for a pretty url
         $prettyUrl = $this->getPrettyUrl();
         if (!empty($prettyUrl) && strlen($prettyUrl) > 1) {
             return $prettyUrl;
         }
     }
     return $path;
 }