phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
Position.php
Go to the documentation of this file.
1<?php
2namespace Ajax\ui\properties;
3
5
12class Position extends BaseComponent {
13
14 public function __construct($my = "left top", $at = "left bottom", $collision = "none", $within = "window") {
15 $this->setParam("my", $my);
16 $this->setParam("at", $at);
17 $this->setParam("collision", $collision);
18 $this->setParam("within", $within);
19 }
20
34 public function setMy($value) {
35 $this->setParamCtrl("my", $value, "is_string");
36 }
37
46 public function setAt($value) {
47 $this->setParamCtrl("at", $value, "is_string");
48 }
49
58 public function setOf($value) {
59 $this->setParamCtrl("of", $value, "is_string");
60 }
61
69 public function setCollision($value) {
70 $this->setParamCtrl("collision", $value, "is_string");
71 }
72
80 public function setWithin($value) {
81 $this->setParamCtrl("within", $value, "is_string");
82 }
83
84 protected function setParamCtrl($key, $value, $typeCtrl) {
85 if (! $typeCtrl($value)) {
86 throw new \Exception("La fonction " . $typeCtrl . " a retourné faux pour l'affectation de la propriété " . $key . " à la position");
87 } else
88 $this->setParam($key, $value);
89 }
90
91 /*
92 * (non-PHPdoc)
93 * @see \Ajax\common\BaseComponent::getScript()
94 */
95 public function getScript() {}
96}
Base component for JQuery UI visuals components.
Composant JQuery UI Position property.
Definition Position.php:12
setAt($value)
Defines which position on the target element to align the positioned element against: "horizontal ver...
Definition Position.php:46
__construct($my="left top", $at="left bottom", $collision="none", $within="window")
Definition Position.php:14
setParamCtrl($key, $value, $typeCtrl)
Definition Position.php:84
setCollision($value)
When the positioned element overflows the window in some direction, move it to an alternative positio...
Definition Position.php:69
setOf($value)
Which element to position against.
Definition Position.php:58
setWithin($value)
Element to position within, affecting collision detection.
Definition Position.php:80
setMy($value)
Defines which position on the element being positioned to align with the target element: "horizontal ...
Definition Position.php:34