-
Notifications
You must be signed in to change notification settings - Fork 1
/
node.php
41 lines (36 loc) · 1.08 KB
/
node.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
<?php
/**
* Joomlatools Framework - https://www.joomlatools.com/developer/framework/
*
* @copyright Copyright (C) 2011 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/joomlatools/joomlatools-framework-files for the canonical source repository
*/
/**
* Node Controller
*
* @author Ercan Ozkaya <https://github.com/ercanozkaya>
* @package Koowa\Component\Files
*/
class ComFilesControllerNode extends ComFilesControllerAbstract
{
protected function _initialize(KObjectConfig $config)
{
$config->append(array(
'behaviors' => array('thumbnailable')
));
parent::_initialize($config);
}
protected function _beforeMove(KControllerContextInterface $context)
{
$request = $this->getRequest();
if ($request->data->has('name')) {
$request->query->name = $request->data->name;
unset($request->data->name);
}
}
protected function _beforeCopy(KControllerContextInterface $context)
{
$this->_beforeMove($context);
}
}