00001 <?php
00002
00010 class TKConfirmAction extends TKAction {
00011 protected $msg;
00012
00017 public function __construct($msg) {
00018 parent::__construct();
00019
00020 $this->msg = $msg;
00021 }
00022
00024 public function getInvocation() {
00025 return "if(!confirm('" . htmlspecialchars(addslashes($this->msg)) . "')) return false;";
00026 }
00027
00029 public static function createFromXML($attrs, $children) {
00030 $msg = $attrs['msg'];
00031 $obj = new TKConfirmAction($msg);
00032 return $obj;
00033 }
00034 }