Exemplo n.º 1
0
 public function restoreChilds(Element_Interface $element)
 {
     $element->save();
     if (method_exists($element, "getChilds")) {
         if ($element instanceof Object_Abstract) {
             // don't use the getter because this will return an empty array (variants are excluded by default)
             $childs = $element->o_childs;
         } else {
             $childs = $element->getChilds();
         }
         foreach ($childs as $child) {
             $this->restoreChilds($child);
         }
     }
 }
Exemplo n.º 2
0
 /**
  * @static
  * @param  Element_Interface $element
  * @return void
  */
 protected static function performSanityCheck($element)
 {
     $element->setUserModification(0);
     $element->save();
     if ($version = $element->getLatestVersion(true)) {
         $version->setNote("Sanitycheck");
         $version->save();
     }
 }