public function export($formValues, $destination)
    {
        if (isset($formValues['filename'], $formValues['resource'])) {
            $class = new core_kernel_classes_Class($formValues['resource']);
            $adapter = new tao_helpers_data_GenerisAdapterRdf();
            $rdf = $adapter->export($class);

            if (!empty($rdf)) {
                $name = $formValues['filename'] . '_' . time() . '.rdf';
                $path = tao_helpers_File::concat([$destination, $name]);

                if (!tao_helpers_File::securityCheck($path, true)) {
                    throw new Exception('Unauthorized file name');
                }

                if (file_put_contents($path, $rdf)) {
                    $this->getEventManager()->trigger(new RdfExportEvent($class));

                    return $path;
                }
            }
        }

        return '';
    }