Ejemplo n.º 1
0
 /**
  * Revert the block to the rootVersion and if version equals false it will give you the newest by default.
  *
  * @param BlockInterface $block
  * @param null|integer   $rootVersion
  */
 public function revert(BlockInterface $block, $version)
 {
     $block->accept(new RevertVisitor($this, $version));
     if ($block instanceof BlockContainerInterface) {
         self::treeAddMissingChildren($block);
         self::treeRemoveInvalidChildren($block);
         $block->accept(new SortVisitor());
     }
 }