00001 <?php
00002
00007 class TKHideAction extends TKChangeStyleAction {
00013 public function __construct($target, $type = 'display') {
00014 if($type == 'display')
00015 parent::__construct($target, array('display' => 'none'));
00016 else
00017 parent::__construct($target, array('visibility' => 'hidden'));
00018 }
00019
00021 public static function createFromXML($attrs, $children) {
00022 $targetId = (string)$attrs['target'];
00023 if(isset($attrs['method']) && (string)$attrs['method'] != "")
00024 $type = (string)$attrs['method'];
00025 else
00026 $type = 'display';
00027 $target = Toolkit::getComponent($targetId);
00028 $obj = new TKHideAction($target, $type);
00029 return $obj;
00030 }
00031 }
00032
00033 ?>