forked from koala-framework/koala-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Component.php
37 lines (35 loc) · 1.19 KB
/
Component.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
<?php
class Kwc_Basic_Flash_Upload_Component extends Kwc_Abstract_Flash_Upload_Component
{
public static function getSettings()
{
$ret = parent::getSettings();
$ret['componentName'] = trlKwfStatic('Flash.Upload');
$ret['ownModel'] = 'Kwc_Basic_Flash_Upload_Model';
$ret['extConfig'] = 'Kwf_Component_Abstract_ExtConfig_Form';
$ret['throwHasContentChangedOnRowColumnsUpdate'] = 'kwf_upload_id_media';
return $ret;
}
protected function _getFlashData()
{
$ret = parent::_getFlashData();
$ret['url'] = $this->_getUploadUrl();
$ret['width'] = $this->_getRow()->width;
$ret['height'] = $this->_getRow()->height;
$ret['params'] = array(
'allowfullscreen' => $this->_getRow()->allow_fullscreen ? 'true' : 'false',
'menu' => $this->_getRow()->menu ? 'true' : 'false'
);
return $ret;
}
protected function _getFlashVars()
{
$ret = parent::_getFlashVars();
foreach ($this->_getRow()->getChildRows('FlashVars') as $var) {
if (!empty($var->key)) {
$ret[$var->key] = $var->value;
}
}
return $ret;
}
}