1: <?php
 2: 
 3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 
22: 
23: namespace picon;
24: 
25: 26: 27: 28: 29: 
30: class DialogBehavior extends DefaultJQueryUIBehaviour
31: {
32:     public function __construct()
33:     {
34:         parent::__construct('dialog');
35:     }
36:     
37:     public function setModal($modal)
38:     {
39:         Args::isBoolean($modal, 'modal');
40:         $this->getOptions()->add(new BooleanOption('modal', $modal));
41:     }
42:     
43:     public function setAutoOpen($autoOpen)
44:     {
45:         Args::isBoolean($autoOpen, 'autoOpen');
46:         $this->getOptions()->add(new BooleanOption('autoOpen', $autoOpen));
47:     }
48:     
49:     public function setHeight($height)
50:     {
51:         Args::isNumeric($height, 'height');
52:         $this->getOptions()->add(new NumbericOption('height', $height));
53:     }
54:     
55:     public function setWidth($width)
56:     {
57:         Args::isNumeric($width, 'width');
58:         $this->getOptions()->add(new NumbericOption('width', $width));
59:     }
60:     
61:     public function setBeforeClose($beforeClose, $function = '')
62:     {
63:         Args::callBackArgs($beforeClose, 1, 'beforeClose');
64:         $this->getOptions()->add(new CallbackFunctionOption('beforeClose', $beforeClose, $function));
65:     }
66: }
67: 
68: ?>
69: