-
Notifications
You must be signed in to change notification settings - Fork 3
/
EGroupMagnificPopup.php
44 lines (38 loc) · 1.12 KB
/
EGroupMagnificPopup.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* ## EGroupMagnificPopup class file.
*
* @author Edgard Lorraine Messias <[email protected]>
* @copyright Copyright © Edgard Lorraine Messias 2013-
*/
$dir = dirname(__FILE__);
$alias = md5($dir);
Yii::setPathOfAlias($alias, $dir);
Yii::import($alias . '.EBaseMagnificPopup');
/**
* Description of EGroupMagnificPopup
*
* @see http://dimsemenov.com/plugins/magnific-popup/
* @author Edgard Lorraine Messias <[email protected]>
*/
class EGroupMagnificPopup extends EMagnificPopup {
public $tagName = 'div';
public $htmlOptions = array();
public $delegate = 'a';
public function init() {
$this->defaultOptions = CMap::mergeArray($this->defaultOptions, array(
'delegate' => $this->delegate,
));
$this->target = '#' . $this->id;
echo CHtml::openTag($this->tagName, array('id' => $this->id), $this->htmlOptions);
parent::init();
}
/**
* Run this widget.
* This method registers necessary javascript.
*/
public function run() {
echo CHtml::closeTag($this->tagName);
parent::run();
}
}