public function movePhoto($attr, $isLocal = false, $localFile = false)
 {
     $this->deletePhoto($attr);
     if ($this->id != null) {
         $dir = 'var/storagetheme/' . date('Y') . 'y/' . date('m') . '/' . date('d') . '/' . $this->id . '/';
         erLhcoreClassChatEventDispatcher::getInstance()->dispatch('theme.edit.' . $attr . '_path', array('dir' => &$dir, 'storage_id' => $this->id));
         erLhcoreClassFileUpload::mkdirRecursive($dir);
         if ($isLocal == false) {
             $this->{$attr} = erLhcoreClassSearchHandler::moveUploadedFile('AbstractInput_' . $attr, $dir . '/', '.');
         } else {
             $this->{$attr} = erLhcoreClassSearchHandler::moveLocalFile($localFile, $dir . '/', '.');
         }
         $this->{$attr . '_path'} = $dir;
     } else {
         $this->{$attr . '_pending'} = true;
     }
 }