diff --git a/deployed/windwalker/libraries/windwalker-bundles/index.html b/deployed/windwalker/libraries/windwalker-bundles/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker-bundles/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bin/build.php b/deployed/windwalker/libraries/windwalker/bin/build.php new file mode 100644 index 00000000..d29a7620 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bin/build.php @@ -0,0 +1,170 @@ + [-b|--branch=Branch] + +[Options] + h | help Show help information + b | branch (Optinal) Git branch to build if provided, + will back to staging after completed. +HELP; + + + /** + * execute + * + * @return void + */ + protected function doExecute() + { + // Prepare zip name. + $zipFile = BUILD_ROOT . '/../%s-%s.zip'; + + $version = $this->getArgument(0); + + if (!$version) + { + throw new \Asika\SimpleConsole\CommandArgsException('Please enter a version.'); + } + + $branch = $this->getOption(array('b', 'branch')); + + if ($branch && $branch !== 'staging') + { + $this->exec('git checkout ' . $branch); + } + + $zipFile = new \SplFileInfo(static::cleanPath(sprintf($zipFile, $this->name, $version))); + + $dir = new \RecursiveIteratorIterator(new RecursiveDirectoryIterator(BUILD_ROOT, FilesystemIterator::SKIP_DOTS)); + + // Start ZIP archive + $zip = new ZipArchive; + + @unlink($zipFile->getPathname()); + + $zip->open($zipFile->getPathname(), ZIPARCHIVE::CREATE); + + /** @var \SplFileInfo $file */ + foreach ($dir as $file) + { + $file = str_replace(BUILD_ROOT . DIRECTORY_SEPARATOR , '', $file->getPathname()); + + if ($this->testIgnore('/' . $file)) + { + continue; + } + + $this->out('[Zip file] ' . $file); + $zip->addFile(str_replace('\\', '/', $file)); + } + + $zip->close(); + + if ($branch && $branch !== 'staging') + { + $this->exec('git checkout staging'); + } + + $this->out('Zip success to: ' . realpath($zipFile->getPathname())); + } + + /** + * test + * + * @param string $string + * + * @return boolean + */ + public function testIgnore($string) + { + $match = false; + + // fnmatch() only work for UNIX file path + $string = str_replace(array('/', '\\'), '/', $string); + + foreach ($this->ignores as $rule) + { + // Negative + if (substr($rule, 0, 1) == '!') + { + $rule = substr($rule, 1); + + if (fnmatch($rule, $string)) + { + $match = false; + } + } + // Normal + else + { + if (fnmatch($rule, $string)) + { + $match = true; + } + } + } + + return $match; + } + + /** + * cleanPath + * + * @param string $path + * @param string $ds + * + * @return string + */ + public static function cleanPath($path, $ds = DIRECTORY_SEPARATOR) + { + return str_replace(array('/', '\\'), $ds, $path); + } +} + +$build = new Build; + +$build->execute(); diff --git a/deployed/windwalker/libraries/windwalker/bin/dirs.php b/deployed/windwalker/libraries/windwalker/bin/dirs.php new file mode 100644 index 00000000..4c9ef4c9 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bin/dirs.php @@ -0,0 +1,15 @@ + '.', + 'media/windwalker' => 'asset', +); diff --git a/deployed/windwalker/libraries/windwalker/bin/gen-test.php b/deployed/windwalker/libraries/windwalker/bin/gen-test.php new file mode 100644 index 00000000..0f5acab6 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bin/gen-test.php @@ -0,0 +1,168 @@ +io->getArgument(0); + $class = $this->io->getArgument(1); + $class = StringNormalise::toClassNamespace($class); + + if (!class_exists($class)) + { + $class = 'Windwalker\\Core\\' . $package . '\\' . $class; + } + + if (!class_exists($class)) + { + $this->stop('Class not exists: ' . $class); + } + + $classPath = ReflectionHelper::getPath($class); + $testPath = WINDWALKER_ROOT . DIRECTORY_SEPARATOR . 'test'; + $testClass = $this->io->getArgument(2, ReflectionHelper::getShortName($class) . 'Test'); + $testClass = StringNormalise::toClassNamespace($testClass); + $testFile = $testPath . DIRECTORY_SEPARATOR . ucfirst($package) . DIRECTORY_SEPARATOR . Path::clean($testClass) . '.php'; + $realTestClass = 'Windwalker\\Core\\Test\\' . ucfirst($package) . '\\' . $testClass; + $autoload = WINDWALKER_ROOT . '/vendor/autoload.php'; + + $skelgen = 'vendor/phpunit/phpunit-skeleton-generator/phpunit-skelgen'; + + if (!is_file(WINDWALKER_ROOT . '/' . $skelgen)) + { + $skelgen = '../../phpunit/phpunit-skeleton-generator/phpunit-skelgen'; + } + + $command = sprintf( + $skelgen . ' generate-test --bootstrap="%s" %s %s %s %s', + $autoload, + $class, + $classPath, + $realTestClass, + $testFile + ); + + $command = 'php ' . WINDWALKER_ROOT . '/' . $command; + + if (!defined('PHP_WINDOWS_VERSION_MAJOR')) + { + // Replace '\' to '\\' in MAC + $command = str_replace('\\', '\\\\', $command); + } + + \Windwalker\Filesystem\Folder::create(dirname($testFile)); + + $this->exec($command); + } + + /** + * getPackagePath + * + * @param string $class + * @param string $classPath + * + * @return void + */ + protected function getPackagePath($class, $classPath) + { + $classFile = Path::clean($class) . '.php'; + $classFile = substr($classFile, 11); + $this->out($classFile); + $this->out($classPath); + $packagePath = str_replace($classFile, '', $classPath); + $this->out($packagePath); + print_r($classFile); + } + + /** + * Exec a command. + * + * @param string $command + * @param array $arguments + * @param array $options + * + * @return string + */ + protected function exec($command, $arguments = array(), $options = array()) + { + $arguments = implode(' ', (array) $arguments); + $options = implode(' ', (array) $options); + $command = sprintf('%s %s %s', $command, $arguments, $options); + + $this->out('>> ' . $command); + + $return = exec(trim($command), $this->lastOutput, $this->lastReturn); + + $this->out($return); + } + + /** + * stop + * + * @param string $msg + * + * @return void + */ + protected function stop($msg = null) + { + if ($msg) + { + $this->out($msg); + } + + $this->close(); + } +} + +$app = new GenTest; +$app->execute(); diff --git a/deployed/windwalker/libraries/windwalker/bin/index.html b/deployed/windwalker/libraries/windwalker/bin/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bin/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bin/library/console.php b/deployed/windwalker/libraries/windwalker/bin/library/console.php new file mode 100644 index 00000000..c3bcb280 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bin/library/console.php @@ -0,0 +1,450 @@ + array('n', 'no', 'false', 0, '0', true), + 1 => array('y', 'yes', 'true', 1, '1', false, null) + ); + + /** + * CliInput constructor. + * + * @param array $argv + */ + public function __construct($argv = null) + { + $this->parseArgv($argv ? : $_SERVER['argv']); + + $this->init(); + } + + /** + * init + * + * @return void + */ + protected function init() + { + // Override if necessary + } + + /** + * execute + * + * @param \Closure|null $callback + * + * @return int + */ + public function execute(\Closure $callback = null) + { + try + { + if ($this->getOption($this->helpOptions)) + { + $this->out($this->getHelp()); + + return 0; + } + + if ($callback) + { + if (version_compare(PHP_VERSION, '5.4', '>=')) + { + $callback = $callback->bindTo($this); + } + + $result = call_user_func($callback, $this); + } + else + { + $result = $this->doExecute(); + } + } + catch (\Exception $e) + { + $result = $this->handleException($e); + } + catch (\Throwable $e) + { + $result = $this->handleException($e); + } + + if ($result === true) + { + $result = 0; + } + elseif ($result === false) + { + $result = 255; + } + else + { + $result = (bool) $result; + } + + return (int) $result; + } + + /** + * doExecute + * + * @return void + */ + protected function doExecute() + { + // Please override this method. + } + + /** + * getHelp + * + * @return string + */ + protected function getHelp() + { + return trim($this->help); + } + + /** + * handleException + * + * @param \Exception|\Throwable $e + * + * @return void + */ + protected function handleException($e) + { + $v = $this->getOption('v'); + + if ($e instanceof CommandArgsException) + { + $this->err('[Warning] ' . $e->getMessage()) + ->err() + ->err($this->getHelp()); + } + else + { + $this->err('[Error] ' . $e->getMessage()); + } + + if ($v) + { + $this->err('[Backtrace]:') + ->err($e->getTraceAsString()); + } + + $code = $e->getCode(); + + return $code === 0 ? 255 : $code; + } + + /** + * getArgument + * + * @param int $offset + * @param mixed $default + * + * @return mixed|null + */ + public function getArgument($offset, $default = null) + { + if (!isset($this->args[$offset])) + { + return $default; + } + + return $this->args[$offset]; + } + + /** + * setArgument + * + * @param int $offset + * @param mixed $value + * + * @return static + */ + public function setArgument($offset, $value) + { + $this->args[$offset] = $value; + + return $this; + } + + /** + * getOption + * + * @param string|array $name + * @param mixed $default + * + * @return mixed|null + */ + public function getOption($name, $default = null) + { + $name = (array) $name; + + foreach ($name as $n) + { + if (isset($this->options[$n])) + { + return $this->options[$n]; + } + } + + return $default; + } + + /** + * setOption + * + * @param string $name + * @param mixed $value + * + * @return static + */ + public function setOption($name, $value) + { + $name = (array) $name; + + foreach ($name as $n) + { + $this->options[$n] = $value; + } + + return $this; + } + + /** + * out + * + * @param string $text + * @param boolean $nl + * + * @return Build + */ + public function out($text = null, $nl = true) + { + fwrite(STDOUT, $text . ($nl ? "\n" : '')); + + return $this; + } + + /** + * err + * + * @param string $text + * @param boolean $nl + * + * @return Build + */ + public function err($text = null, $nl = true) + { + fwrite(STDERR, $text . ($nl ? "\n" : '')); + + return $this; + } + + /** + * in + * + * @param string $ask + * @param mixed $default + * + * @return string + */ + public function in($ask = '', $default = null, $bool = false) + { + $this->out($ask, false); + + $in = rtrim(fread(STDIN, 8192), "\n\r"); + + if ($bool) + { + $in = $in === '' ? $default : $in; + + return (bool) $this->mapBoolean($in); + } + + return $in === '' ? (string) $default : $in; + } + + /** + * mapBoolean + * + * @param string $in + * + * @return bool + */ + public function mapBoolean($in) + { + $in = strtolower((string) $in); + + if (in_array($in, $this->booleanMapping[0], true)) + { + return false; + } + + if (in_array($in, $this->booleanMapping[1], true)) + { + return true; + } + + return null; + } + + /** + * exec + * + * @param string $command + * + * @return static + */ + protected function exec($command) + { + $this->out('>> ' . $command); + + $return = exec($command); + + $this->out($return . "\n"); + + return $this; + } + + /** + * parseArgv + * + * @param array $argv + * + * @return void + */ + protected function parseArgv($argv) + { + $this->executable = array_shift($argv); + $out = array(); + + for ($i = 0, $j = count($argv); $i < $j; $i++) + { + $arg = $argv[$i]; + // --foo --bar=baz + if (substr($arg, 0, 2) === '--') + { + $eqPos = strpos($arg, '='); + + // --foo + if ($eqPos === false) + { + $key = substr($arg, 2); + // --foo value + if ($i + 1 < $j && $argv[$i + 1][0] !== '-') + { + $value = $argv[$i + 1]; + $i++; + } + else + { + $value = isset($out[$key]) ? $out[$key] : true; + } + $out[$key] = $value; + } + // --bar=baz + else + { + $key = substr($arg, 2, $eqPos - 2); + $value = substr($arg, $eqPos + 1); + $out[$key] = $value; + } + } + // -k=value -abc + elseif (substr($arg, 0, 1) === '-') + { + // -k=value + if (substr($arg, 2, 1) === '=') + { + $key = substr($arg, 1, 1); + $value = substr($arg, 3); + $out[$key] = $value; + } + // -abc + else + { + $chars = str_split(substr($arg, 1)); + + foreach ($chars as $char) + { + $key = $char; + $out[$key] = isset($out[$key]) ? $out[$key] + 1 : 1; + } + // -a a-value + if ((count($chars) === 1) && ($i + 1 < $j) && ($argv[$i + 1][0] !== '-')) + { + $out[$key] = $argv[$i + 1]; + $i++; + } + } + } + // Plain-arg + else + { + $this->args[] = $arg; + } + } + + $this->options = $out; + } +} + +class CommandArgsException extends \RuntimeException {} diff --git a/deployed/windwalker/libraries/windwalker/bin/library/index.html b/deployed/windwalker/libraries/windwalker/bin/library/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bin/library/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bin/makelink b/deployed/windwalker/libraries/windwalker/bin/makelink new file mode 100644 index 00000000..0244cb2a --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bin/makelink @@ -0,0 +1,128 @@ +#!/bin/sh php + + + h | help Show help info. + f | force Force replace exists dir. +HELP; + + /** + * doExecute + * + * @return bool + */ + protected function doExecute() + { + $joomlaDir = $this->getArgument(0); + + // Check Arguments + if (!$joomlaDir) + { + throw new \Asika\SimpleConsole\CommandArgsException('Please give me Joomla path.'); + } + + // Check Joomla dir + if (!is_dir($joomlaDir . '/libraries/joomla')) + { + throw new \RuntimeException(sprintf('%s is not a Joomla dir.', $joomlaDir)); + } + + // Prepare some variables + $windows = defined('PHP_WINDOWS_VERSION_MAJOR'); + $root = dirname(__DIR__); + + $dirs = include __DIR__ . '/dirs.php'; + + // Do bakup and create link + foreach ($dirs as $dir => $target) + { + $dir = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $dir); + $target = str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $target); + + if ($windows) + { + if (is_dir("{$joomlaDir}\\{$dir}")) + { + if ($this->getOption(array('f', 'force'))) + { + $this->exec("rmdir {$joomlaDir}\\{$dir}"); + } + else + { + $this->exec("powershell.exe mv {$joomlaDir}\\{$dir} {$joomlaDir}\\{$dir}.bak"); + } + } + + $this->exec("mklink /D {$joomlaDir}\\{$dir} {$root}\\{$target}"); + + $this->out("Make link {$joomlaDir}\\{$dir} to {$root}\\{$target}"); + } + else + { + if (is_dir("{$joomlaDir}/{$dir}")) + { + if ($this->getOption(array('f', 'force'))) + { + exec("rm -rf {$joomlaDir}/{$dir}"); + } + else + { + exec("mv {$joomlaDir}/{$dir} {$joomlaDir}/{$dir}.bak"); + } + } + + $this->exec("ln -s {$root}/{$target} {$joomlaDir}/{$dir}"); + + $this->out("Make link {$root}/{$target} to {$joomlaDir}/{$dir}"); + } + } + + $this->createBinFile($joomlaDir); + + return true; + } + + /** + * createBinFile + * + * @param string $joomlaDir + * + * @return void + */ + protected function createBinFile($joomlaDir) + { + include_once __DIR__ . '/../src/System/Installer/WindwalkerInstaller.php'; + + \Windwalker\System\Installer\WindwalkerInstaller::createBinFile($joomlaDir); + + $this->out('Bin file created.'); + + \Windwalker\System\Installer\WindwalkerInstaller::createBundleDir($joomlaDir); + + $this->out('Bundle folder created.'); + } +} + +$app = new Makelink; +$app->execute(); diff --git a/deployed/windwalker/libraries/windwalker/bin/release.php b/deployed/windwalker/libraries/windwalker/bin/release.php new file mode 100644 index 00000000..931b7118 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bin/release.php @@ -0,0 +1,217 @@ + + +[Options] + h | help Show help information + d | dry-run Dry run. + f | force Force operation. +HELP; + + /** + * execute + * + * @return void + * @throws \Asika\SimpleConsole\CommandArgsException + */ + protected function doExecute() + { + $this->dry = $this->getOption(array('d', 'dry-run')); + $this->force = $this->getOption(array('f', 'force')); + $version = $this->getArgument(0); + $nextVersion = $this->getArgument(1); + + $f = $this->force ? ' -f' : ''; + + if (!$version) + { + throw new \Asika\SimpleConsole\CommandArgsException('Please enter a version.'); + } + + if (!$this->dry) + { + $this->exec('git checkout ' . $this->masterBranch); + + $this->exec('git merge ' . $this->stagingBranch); + + $this->exec('git tag ' . $version . $f); + + $this->exec('git checkout ' . $this->stagingBranch); + } + + if (!$nextVersion) + { + $v = array_pad(explode('.', $version), 3, 0); + + $v[2]++; + + $nextVersion = implode('.', $v); + } + + $this->upNewVersions($nextVersion); + + if (!$nextVersion) + { + $v = array_pad(explode('.', $version), 3, 0); + + $v[0] += 2; + + $nextVersion = implode('.', $v); + } + + $this->upVersions($nextVersion); + + if (!$this->dry) + { + $this->exec(sprintf('git commit -am "Prepare for %s development."', $nextVersion)); + + $this->exec('git push origin ' . $this->stagingBranch . ' ' . $this->masterBranch . $f); + + $this->exec('git push origin --tags' . $f); + } + + $this->out()->out('Release to version: ' . $version . ' and prepared for ' . $nextVersion); + } + + /** + * upVersions + * + * @param string $version + * + * @return void + */ + protected function upVersions($version) + { + $manifests = $this->manifests; + + foreach ($manifests as $manifest) + { + $file = BUILD_ROOT . '/' . $manifest; + + if (is_file($file)) + { + $xml = file_get_contents($file); + + $xml = preg_replace('/([\w.]+)<\/version>/', '' . $version . '', $xml); + + $this->out(sprintf('[Replace version] %s', $manifest)); + + if (!$this->dry) + { + file_put_contents($file, $xml); + } + } + } + } + + /** + * upVersions + * + * @param string $version + * + * @return void + */ + protected function upNewVersions($version) + { + $manifests = $this->manifests; + + foreach ($manifests as $manifest) + { + $file = BUILD_ROOT . '/' . $manifest; + + if (is_file($file)) + { + $xml = file_get_contents($file); + + $xml = preg_replace('/([\w.]+)<\/newversion>/', '' . $version . '', $xml); + + $this->out(sprintf('[Replace newversion] %s', $manifest)); + + if (!$this->dry) + { + file_put_contents($file, $xml); + } + } + } + } + + /** + * cleanPath + * + * @param string $path + * @param string $ds + * + * @return string + */ + public static function cleanPath($path, $ds = DIRECTORY_SEPARATOR) + { + return str_replace(array('/', '\\'), $ds, $path); + } +} + +$build = new Release; + +$build->execute(); diff --git a/deployed/windwalker/libraries/windwalker/bin/windwalker.php b/deployed/windwalker/libraries/windwalker/bin/windwalker.php new file mode 100644 index 00000000..f5224906 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bin/windwalker.php @@ -0,0 +1,58 @@ +get('app'); + +Factory::$application = $console; + +$console->setDescription(null) + ->execute(); diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/AbstractAction.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/AbstractAction.php new file mode 100644 index 00000000..347945aa --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/AbstractAction.php @@ -0,0 +1,29 @@ +container = $container ? : Container::getInstance(); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/ConvertTemplateAction.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/ConvertTemplateAction.php new file mode 100644 index 00000000..353558d9 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/ConvertTemplateAction.php @@ -0,0 +1,48 @@ +replace); + + foreach ($replace as &$val) + { + $val = '{{' . $val . '}}'; + } + + // Flip src and dest because we want to convert template. + $src = $this->config['dir.src']; + $dest = $this->config['dir.dest']; + + // Remove dir first + if (is_dir($dest)) + { + Folder::delete($dest); + } + + $this->container->get('operator.convert')->copy($src, $dest, $replace); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/CopyAllAction.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/CopyAllAction.php new file mode 100644 index 00000000..b75d6e60 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/CopyAllAction.php @@ -0,0 +1,33 @@ +container->get('operator.copy'); + + $config = $this->config; + + $copyOperator->copy($config['dir.src'], $config['dir.dest'], (array) $config['replace']); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/CopyLanguageAction.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/CopyLanguageAction.php new file mode 100644 index 00000000..68754e75 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/CopyLanguageAction.php @@ -0,0 +1,149 @@ +config['dir.src'] . '/language'); + } + catch (\UnexpectedValueException $e) + { + return; + } + + // Each languages + foreach ($lanDir as $dir) + { + if ($lanDir->isDot() || $lanDir->isFile()) + { + continue; + } + + $this->handleINIFile($dir->getBasename()); + } + } + + /** + * handleINIFile + * + * @param string $dir + * + * @return void + */ + protected function handleINIFile($dir) + { + $src = $this->config['dir.src']; + $dest = $this->config['dir.dest']; + $fileName = $dir . '.' . $this->config['element'] . '%s.ini'; + + $mainINI = $this->findIniBySuffix($dir, 'main'); + $sysINI = $this->findIniBySuffix($dir, 'sys'); + + // Main file + $targetFile = $dest . '/language/' . $dir . '/' . sprintf($fileName, ''); + + if (strpos(file_get_contents($targetFile), '; ' . $this->config['replace.controller.item.name.cap']) === false) + { + $mainINI = $this->getSubsystemText($mainINI); + + $fp = fopen($targetFile, 'a+'); + fwrite($fp, "\n\n\n" . $mainINI); + fclose($fp); + + $this->controller->out('Write subsystem ini to: ' . $targetFile); + } + + // Sys file + $targetFile = $dest . '/language/' . $dir . '/' . sprintf($fileName, '.sys'); + + if (strpos(file_get_contents($targetFile), '; ' . $this->config['replace.controller.item.name.cap']) === false) + { + $sysINI = $this->getSubsystemText($sysINI); + + $fp = fopen($targetFile, 'a+'); + fwrite($fp, "\n\n\n" . $sysINI); + fclose($fp); + + $this->controller->out('Write subsystem ini to: ' . $targetFile); + } + } + + /** + * findIniBySuffix + * + * @param string $dir + * @param string $suffix + * + * @return mixed + */ + protected function findIniBySuffix($dir, $suffix = 'main') + { + try + { + $files = new \FilesystemIterator($this->config['dir.src'] . '/language/' . $dir); + } + catch (\UnexpectedValueException $e) + { + exit('No such file: ' . $this->config['dir.src'] . '/language' . $dir); + } + + + foreach ($files as $file) + { + $name = $file->getBasename(); + + $extract = explode('.', $name); + + if ($suffix === 'main' && count($extract) === 5) + { + return $file; + } + elseif (isset($extract[4]) && $extract[4] === $suffix) + { + return $file; + } + } + + return null; + } + + /** + * getSubsystemText + * + * @param \SplFileinfo $file + * + * @return string + */ + protected function getSubsystemText(\SplFileinfo $file) + { + $text = file_get_contents($file); + + $text = substr($text, strpos($text, '; {{controller.item.name.cap}}') - strlen($text)); + + return SimpleTemplate::render($text, $this->config['replace']); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/ImportSqlAction.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/ImportSqlAction.php new file mode 100644 index 00000000..fe92d85a --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/ImportSqlAction.php @@ -0,0 +1,90 @@ +config['dir.src'] . '/sql/install.sql'); + @$uninstallFile = file_get_contents($this->config['dir.src'] . '/sql/uninstall.sql'); + + $installSql = SimpleTemplate::render($installFile, $this->config['replace']); + $uninstallSql = SimpleTemplate::render($uninstallFile, $this->config['replace']); + + // Prevent import twice + $table = '#__' . $this->config['name'] . '_' . $this->config['replace.controller.list.name.lower']; + + $db = Container::getInstance()->get('db'); + + try + { + $db->getTableColumns($table); + } + catch (\RuntimeException $e) + { + // Import sql + $this->controller->out('Importing SQL to table: ' . $table); + $this->executeSql($installSql); + $this->controller->out('Imported'); + } + + if (!strpos($installSql, $table)) + { + // Write SQL file to project. + @$fp = fopen($this->config['dir.dest'] . '/sql/install.sql', 'a+'); + @fputs($fp, "\n\n\n" . $installSql); + @fclose($fp); + + @$fp = fopen($this->config['dir.dest'] . '/sql/uninstall.sql', 'a+'); + @fputs($fp, "\n\n" . $uninstallSql); + @fclose($fp); + } + } + + /** + * executeSql + * + * @param string $sql + * + * @return void + */ + protected function executeSql($sql) + { + $db = Container::getInstance()->get('db'); + + $queries = $db->splitSql($sql); + + foreach ($queries as $query) + { + if (!trim($query)) + { + continue; + } + + $db->setQuery($query)->execute(); + } + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/Subsystem/CopyItemAction.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/Subsystem/CopyItemAction.php new file mode 100644 index 00000000..58257c40 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/Subsystem/CopyItemAction.php @@ -0,0 +1,58 @@ +container->get('operator.copy'); + + $src = $this->config['dir.src']; + $dest = $this->config['dir.dest']; + + $item = $this->config['item_name']; + + $files = array( + 'controller/%s', + 'model/form/%s.xml', + 'model/%s.php', + 'router/handler/%s.php', + 'view/%s' + ); + + foreach ($files as $file) + { + $file = sprintf($file, $item); + + if (!file_exists($src . '/' . $file)) + { + continue; + } + + $copyOperator->copy( + $src . '/' . $file, + $dest . '/' . $file, + $this->config['replace'] + ); + } + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/Subsystem/CopyListAction.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/Subsystem/CopyListAction.php new file mode 100644 index 00000000..185d9fd6 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/Subsystem/CopyListAction.php @@ -0,0 +1,58 @@ +container->get('operator.copy'); + + $src = $this->config['dir.src']; + $dest = $this->config['dir.dest']; + + $list = $this->config['list_name']; + + $files = array( + 'controller/%s', + 'model/form/%s', + 'model/%s.php', + 'router/handler/%s.php', + 'view/%s' + ); + + foreach ($files as $file) + { + $file = sprintf($file, $list); + + if (!file_exists($src . '/' . $file)) + { + continue; + } + + $copyOperator->copy( + $src . '/' . $file, + $dest . '/' . $file, + $this->config['replace'] + ); + } + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/Subsystem/PrepareAction.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/Subsystem/PrepareAction.php new file mode 100644 index 00000000..6c71d4c1 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/Subsystem/PrepareAction.php @@ -0,0 +1,61 @@ +container->get('operator.copy'); + + $src = $this->config['dir.src']; + $dest = $this->config['dir.dest']; + + $files = array( + 'model/field' + ); + + if ($this->config['client'] === 'administrator') + { + $files[] = 'table/' . $this->config['item_name'] . '.php'; + $files[] = 'src/{{extension.name.cap}}/Mapper/{{controller.item.name.cap}}Mapper.php'; + } + + foreach ($files as $file) + { + if (!file_exists($src . '/' . $file)) + { + continue; + } + + $copyOperator->copy( + $src . '/' . $file, + $dest . '/' . $file, + $this->config['replace'] + ); + } + + $this->controller->doAction(new Component\ImportSqlAction); + + $this->controller->doAction(new Component\CopyLanguageAction); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/Subsystem/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/Subsystem/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/Subsystem/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Component/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/ConvertTemplateAction.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/ConvertTemplateAction.php new file mode 100644 index 00000000..b6763167 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/ConvertTemplateAction.php @@ -0,0 +1,49 @@ +replace); + + foreach ($replace as &$val) + { + $val = '{{' . $val . '}}'; + } + + // Flip src and dest because we want to convert template. + $src = $this->config['dir.src']; + $dest = $this->config['dir.dest']; + + if (!is_dir($src)) + { + throw new \RuntimeException(sprintf('Extension "%s" in %s not exists', $this->config['element'], $this->config['client'])); + } + + // Remove dir first + Folder::delete($dest); + + $this->container->get('operator.convert')->copy($src, $dest, $replace); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/CopyAllAction.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/CopyAllAction.php new file mode 100644 index 00000000..f6082088 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/CopyAllAction.php @@ -0,0 +1,37 @@ +container->get('operator.copy'); + + $config = $this->config; + + if (!is_dir($config['dir.tmpl'])) + { + throw new \RuntimeException(sprintf('Template "%s" of %s not exists', $config['template'], $config['extension'])); + } + + $copyOperator->copy($config['dir.src'], $config['dir.dest'], (array) $config['replace']); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Module/ReplaceXmlClientAction.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Module/ReplaceXmlClientAction.php new file mode 100644 index 00000000..7a4d87a0 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Module/ReplaceXmlClientAction.php @@ -0,0 +1,37 @@ +config['dir.dest'] . '/{{extension.element.lower}}.xml'; + + $content = file_get_contents($xml); + + $content = str_replace('client="site"', '{{module.client}}', $content); + + File::write($xml, $content); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Module/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Module/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Module/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Test/GenClassAction.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Test/GenClassAction.php new file mode 100644 index 00000000..7ccf681d --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Test/GenClassAction.php @@ -0,0 +1,38 @@ +replace); + + Folder::create(dirname($this->config['replace.test.class.file'])); + + file_put_contents($this->config['replace.test.class.file'], $file); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Test/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Test/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/Test/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Action/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/AddCommand.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/AddCommand.php new file mode 100644 index 00000000..c10c6266 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/AddCommand.php @@ -0,0 +1,76 @@ + '; + + /** + * Configure command information. + * + * @return void + */ + public function initialise() + { + $this->addCommand(new AddItemCommand); + $this->addCommand(new AddListCommand); + $this->addCommand(new SubsystemCommand); + + parent::initialise(); + } + + /** + * Execute this command. + * + * @return int|void + */ + protected function doExecute() + { + return parent::doExecute(); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/AddItem/AddItemCommand.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/AddItem/AddItemCommand.php new file mode 100644 index 00000000..f8d0d121 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/AddItem/AddItemCommand.php @@ -0,0 +1,74 @@ + '; + + /** + * Configure command information. + * + * @return void + */ + public function initialise() + { + // $this->addArgument(); + + parent::initialise(); + } + + /** + * Execute this command. + * + * @return int|void + */ + protected function doExecute() + { + $generator = new GeneratorController($this); + + $generator->setTask('add.item')->execute(); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/AddItem/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/AddItem/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/AddItem/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/AddList/AddListCommand.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/AddList/AddListCommand.php new file mode 100644 index 00000000..5927fe19 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/AddList/AddListCommand.php @@ -0,0 +1,74 @@ + '; + + /** + * Configure command information. + * + * @return void + */ + public function initialise() + { + // $this->addArgument(); + + parent::initialise(); + } + + /** + * Execute this command. + * + * @return int|void + */ + protected function doExecute() + { + $generator = new GeneratorController($this); + + $generator->setTask('add.list')->execute(); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/AddList/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/AddList/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/AddList/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/Subsystem/SubsystemCommand.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/Subsystem/SubsystemCommand.php new file mode 100644 index 00000000..56383ef8 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/Subsystem/SubsystemCommand.php @@ -0,0 +1,74 @@ + '; + + /** + * Configure command information. + * + * @return void + */ + public function initialise() + { + // $this->addArgument(); + + parent::initialise(); + } + + /** + * Execute this command. + * + * @return int|void + */ + protected function doExecute() + { + $generator = new GeneratorController($this); + + $generator->setTask('add.subsystem')->execute(); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/Subsystem/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/Subsystem/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/Subsystem/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Add/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Convert/ConvertCommand.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Convert/ConvertCommand.php new file mode 100644 index 00000000..e1fab8f7 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Convert/ConvertCommand.php @@ -0,0 +1,74 @@ + '; + + /** + * Configure command information. + * + * @return void + */ + public function initialise() + { + // $this->addArgument(); + + parent::initialise(); + } + + /** + * Execute this command. + * + * @return int|void + */ + protected function doExecute() + { + $generator = new GeneratorController($this); + + $generator->setTask('template.convert')->execute(); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Convert/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Convert/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Convert/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/GeneratorCommand.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/GeneratorCommand.php new file mode 100644 index 00000000..6a5cfcec --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/GeneratorCommand.php @@ -0,0 +1,87 @@ + '; + + /** + * Configure command information. + * + * @return void + */ + public function initialise() + { + parent::initialise(); + + $this->addCommand(new InitCommand); + $this->addCommand(new ConvertCommand); + $this->addCommand(new AddCommand); + $this->addCommand(new TestCommand); + + $this->addGlobalOption('c') + ->alias('client') + ->description('Site or administrator (admin)'); + + $this->addGlobalOption('t') + ->alias('tmpl') + ->defaultValue('default') + ->description('Using template.'); + } + + /** + * Execute this command. + * + * @return int|void + */ + protected function doExecute() + { + return parent::doExecute(); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Init/InitCommand.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Init/InitCommand.php new file mode 100644 index 00000000..c8598394 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Init/InitCommand.php @@ -0,0 +1,74 @@ + '; + + /** + * Configure command information. + * + * @return void + */ + public function initialise() + { + // $this->addArgument(); + + parent::initialise(); + } + + /** + * Execute this command. + * + * @return int|void + */ + protected function doExecute() + { + $generator = new GeneratorController($this); + + $generator->setTask('init')->execute(); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Init/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Init/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Init/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Test/TestCommand.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Test/TestCommand.php new file mode 100644 index 00000000..5598223b --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Test/TestCommand.php @@ -0,0 +1,87 @@ + '; + + /** + * Configure command information. + * + * @return void + */ + public function initialise() + { + $this->help( + <<setTask('test')->execute(); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Test/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Test/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/Test/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/Generator/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Command/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/AbstractJExtensionController.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/AbstractJExtensionController.php new file mode 100644 index 00000000..11eb0f98 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/AbstractJExtensionController.php @@ -0,0 +1,103 @@ +getArgument(1); + + $ctrl = explode('.', $ctrl); + + $inflector = StringInflector::getInstance(); + + if (empty($ctrl[0])) + { + $ctrl[0] = 'item'; + } + + if (empty($ctrl[1])) + { + $ctrl[1] = $inflector->toPlural($ctrl[0]); + } + + list($itemName, $listName) = $ctrl; + + $this->replace['extension.element.lower'] = strtolower($config['element']); + $this->replace['extension.element.upper'] = strtoupper($config['element']); + $this->replace['extension.element.cap'] = ucfirst($config['element']); + + $this->replace['extension.name.lower'] = strtolower($config['name']); + $this->replace['extension.name.upper'] = strtoupper($config['name']); + $this->replace['extension.name.cap'] = ucfirst($config['name']); + + $this->replace['controller.list.name.lower'] = strtolower($listName); + $this->replace['controller.list.name.upper'] = strtoupper($listName); + $this->replace['controller.list.name.cap'] = ucfirst($listName); + + $this->replace['controller.item.name.lower'] = strtolower($itemName); + $this->replace['controller.item.name.upper'] = strtoupper($itemName); + $this->replace['controller.item.name.cap'] = ucfirst($itemName); + + // Set replace to config. + foreach ($this->replace as $key => $val) + { + $config->set('replace.' . $key, $val); + } + + // Set copy dir. + $config->set('dir.dest', PathHelper::get(strtolower($config['element']), $config['client'])); + + $config->set('dir.tmpl', GENERATOR_BUNDLE_PATH . '/Template/' . $config['extension'] . '/' . $config['template']); + + $config->set('dir.src', $config->get('dir.tmpl') . '/' . $config['client']); + + // Replace DS + $config['dir.dest'] = Path::clean($config['dir.dest']); + + $config['dir.tmpl'] = Path::clean($config['dir.tmpl']); + + $config['dir.src'] = Path::clean($config['dir.src']); + + // Push container + $this->container = $container; + + parent::__construct($io, $config, $this->replace); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/AbstractComponentController.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/AbstractComponentController.php new file mode 100644 index 00000000..b6c1952d --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/AbstractComponentController.php @@ -0,0 +1,108 @@ +config->loadFile(__DIR__ . '/config.json'); + } + + /** + * Execute the controller. + * + * @return boolean True if controller finished execution, false if the controller did not + * finish execution. A controller might return false if some precondition for + * the controller to run has not been satisfied. + * + * @since 12.1 + * @throws \LogicException + * @throws \RuntimeException + */ + public function execute() + { + $config = $this->config; + + if (!$config['client']) + { + $config['client'] = 'site'; + + $this->configurePath()->doExecute(); + + $config['client'] = 'administrator'; + + $this->configurePath()->doExecute(); + } + else + { + $config['client'] = ($config['client'] === 'site') ? $config['client'] : 'administrator'; + + $this->configurePath()->doExecute(); + } + + return true; + } + + /** + * Do Execute. + * + * @return void + */ + abstract protected function doExecute(); + + /** + * configurePath + * + * @return $this + */ + protected function configurePath() + { + $config = $this->config; + + $config->set('dir.dest', PathHelper::get(strtolower($config['element']), $config['client'])); + + $config->set('dir.tmpl', GENERATOR_BUNDLE_PATH . '/Template/' . $config['extension'] . '/' . $config['template']); + + $config->set('dir.src', $config->get('dir.tmpl') . '/' . $config['client']); + + // Replace DS + $config['dir.dest'] = Path::clean($config['dir.dest']); + + $config['dir.tmpl'] = Path::clean($config['dir.tmpl']); + + $config['dir.src'] = Path::clean($config['dir.src']); + + return $this; + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/Add/ItemController.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/Add/ItemController.php new file mode 100644 index 00000000..07008375 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/Add/ItemController.php @@ -0,0 +1,35 @@ +config['item_name'] = '{{controller.item.name.lower}}'; + $this->config['list_name'] = '{{controller.list.name.lower}}'; + + $this->doAction(new Subsystem\PrepareAction); + + $this->doAction(new Subsystem\CopyItemAction); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/Add/ListController.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/Add/ListController.php new file mode 100644 index 00000000..c625f52a --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/Add/ListController.php @@ -0,0 +1,35 @@ +config['item_name'] = '{{controller.item.name.lower}}'; + $this->config['list_name'] = '{{controller.list.name.lower}}'; + + $this->doAction(new Subsystem\PrepareAction); + + $this->doAction(new Subsystem\CopyListAction); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/Add/SubsystemController.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/Add/SubsystemController.php new file mode 100644 index 00000000..1deb3e74 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/Add/SubsystemController.php @@ -0,0 +1,37 @@ +config['item_name'] = '{{controller.item.name.lower}}'; + $this->config['list_name'] = '{{controller.list.name.lower}}'; + + $this->doAction(new Component\Subsystem\PrepareAction); + + $this->doAction(new Component\Subsystem\CopyItemAction); + + $this->doAction(new Component\Subsystem\CopyListAction); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/Add/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/Add/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/Add/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/InitController.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/InitController.php new file mode 100644 index 00000000..9dc20cc9 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/InitController.php @@ -0,0 +1,41 @@ +doAction(new Action\CopyAllAction); + + if ($this->config['client'] === 'administrator') + { + $this->doAction(new Action\Component\ImportSqlAction); + + $this->doAction(new Action\Component\CopyLanguageAction); + } + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/Template/ConvertController.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/Template/ConvertController.php new file mode 100644 index 00000000..3e88a56f --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/Template/ConvertController.php @@ -0,0 +1,39 @@ +config->get('dir.dest'); + $src = $this->config->get('dir.src'); + + $this->config->set('dir.dest', $src); + $this->config->set('dir.src', $dest); + + $this->doAction(new Action\Component\ConvertTemplateAction); + + return true; + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/Template/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/Template/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/Template/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/config.json b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/config.json new file mode 100644 index 00000000..e69de29b diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Component/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/GeneratorController.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/GeneratorController.php new file mode 100644 index 00000000..82f47403 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/GeneratorController.php @@ -0,0 +1,263 @@ + 'component', + 'mod_' => 'module', + 'plg_' => 'plugin', + // 'lib_' => 'library', + // 'tpl_' => 'template' + ); + + /** + * constructor. + * + * @param Command $command + * @param Container $container + * @param IOInterface $io + */ + public function __construct(Command $command, Container $container = null, IOInterface $io = null) + { + $this->command = $command; + + $container = $container ? : Container::getInstance(); + + $this->container = $container; + + $container->registerServiceProvider(new GeneratorBundleProvider($command)); + + $io = $io ? : $container->get('io'); + + $io->setCommand($command); + + parent::__construct($io); + + $container->registerServiceProvider(new OperatorProvider($command)); + } + + /** + * Execute the controller. + * + * @return boolean True if controller finished execution, false if the controller did not + * finish execution. A controller might return false if some precondition for + * the controller to run has not been satisfied. + * + * @since 12.1 + * @throws \LogicException + * @throws \RuntimeException + */ + public function execute() + { + $config = array(); + + $this->out()->out('Start generating...')->out(); + + // Prepare basic data. + $command = $this->command; + $element = $command->getArgument(0, new ElementPrompter('Please enter extension element: ')); + + list($extension, $name, $element, $group) = $this->extractElement($element); + + $this->element = $config['element'] = $element; + $this->type = $config['extension'] = $extension; + $this->name = $config['name'] = $name; + $this->group = $config['group'] = $group; + $this->template = $config['template'] = $this->command->getOption('t'); + $this->client = $config['client'] = $this->command->getOption('c'); + + if ($this->client === 'admin') + { + $this->client = $config['client'] = 'administrator'; + } + + // Get Handler + $task = array_map('ucfirst', explode('.', $this->getTask())); + $task = implode('\\', $task); + + $class = 'GeneratorBundle\\Controller\\'; + $class .= ucfirst($this->type) . '\\' . $task . 'Controller'; + + if (!class_exists($class)) + { + throw new \RuntimeException(sprintf('Action %s of %s not support.', $this->type, $this->getTask())); + } + + /** @var AbstractTaskController $controller */ + $controller = new $class($this->container, $this->io, new Registry($config)); + + $controller->execute(); + + $this->out()->out('Template generated.'); + } + + /** + * Extract element. + * + * @param string $element he extension element name, example: com_content or plg_group_name + * + * @return array + * + * @throws \InvalidArgumentException + */ + protected function extractElement($element) + { + $prefix = substr($element, 0, 4); + + $ext = $this->getExtType($prefix); + + $group = ''; + $name = substr($element, 4); + + // Get group + if ($ext === 'plugin') + { + $name = explode('_', $name); + + $group = array_shift($name); + + $name = implode('_', $name); + + if (!$name) + { + throw new \InvalidArgumentException(sprintf('Plugin name need group, eg: "plg_group_name", "%s" given.', $element)); + } + } + + return array($ext, $name, $prefix . $name, $group); + } + + /** + * getExtType + * + * @param string $prefix + * + * @return mixed + * + * @throws \InvalidArgumentException + */ + protected function getExtType($prefix) + { + if (empty($this->extMapper[$prefix])) + { + throw new \InvalidArgumentException(sprintf('Invalid extension prefix "%s".', $prefix)); + } + + return $this->extMapper[$prefix]; + } + + /** + * getTask + * + * @return string + */ + public function getTask() + { + return $this->task; + } + + /** + * setTask + * + * @param string $task + * + * @return GeneratorController Return self to support chaining. + */ + public function setTask($task) + { + $this->task = $task; + + return $this; + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Module/AbstractModuleController.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Module/AbstractModuleController.php new file mode 100644 index 00000000..f193c876 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Module/AbstractModuleController.php @@ -0,0 +1,41 @@ +set('dir.src', $config->get('dir.tmpl')); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Module/InitController.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Module/InitController.php new file mode 100644 index 00000000..c9dd7edc --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Module/InitController.php @@ -0,0 +1,35 @@ +doAction(new Action\CopyAllAction); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Module/Template/ConvertController.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Module/Template/ConvertController.php new file mode 100644 index 00000000..716b4a90 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Module/Template/ConvertController.php @@ -0,0 +1,46 @@ +config->get('dir.dest'); + $src = $this->config->get('dir.src'); + + $this->config->set('dir.dest', $src); + $this->config->set('dir.src', $dest); + + $this->doAction(new Action\ConvertTemplateAction); + $this->doAction(new Action\Module\ReplaceXmlClientAction); + + return true; + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Module/Template/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Module/Template/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Module/Template/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Module/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Module/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Module/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Plugin/AbstractPluginController.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Plugin/AbstractPluginController.php new file mode 100644 index 00000000..16d901f9 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Plugin/AbstractPluginController.php @@ -0,0 +1,45 @@ +replace['plugin.group.lower'] = strtolower($config['group']); + $this->replace['plugin.group.upper'] = strtoupper($config['group']); + $this->replace['plugin.group.cap'] = ucfirst($config['group']); + + parent::__construct($container, $io, $config); + + // Set copy dir. + $config->set('dir.src', $config->get('dir.tmpl')); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Plugin/InitController.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Plugin/InitController.php new file mode 100644 index 00000000..55000e3e --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Plugin/InitController.php @@ -0,0 +1,35 @@ +doAction(new Action\CopyAllAction); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Plugin/Template/ConvertController.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Plugin/Template/ConvertController.php new file mode 100644 index 00000000..4032acfa --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Plugin/Template/ConvertController.php @@ -0,0 +1,45 @@ +config->get('dir.dest'); + $src = $this->config->get('dir.src'); + + $this->config->set('dir.dest', $src); + $this->config->set('dir.src', $dest); + + $this->doAction(new Action\ConvertTemplateAction); + + return true; + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Plugin/Template/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Plugin/Template/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Plugin/Template/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Plugin/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Plugin/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Plugin/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Test/GenController.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Test/GenController.php new file mode 100644 index 00000000..9863061f --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Test/GenController.php @@ -0,0 +1,177 @@ +set('dir.dest', PathHelper::get(strtolower($config['element']), $config['client'])); +// +// $config->set('dir.tmpl', GENERATOR_BUNDLE_PATH . '/Template/' . $config['extension'] . '/' . $config['template']); +// +// $config->set('dir.src', $config->get('dir.tmpl') . '/' . $config['client']); +// +// // Replace DS +// $config['dir.dest'] = Path::clean($config['dir.dest']); +// +// $config['dir.tmpl'] = Path::clean($config['dir.tmpl']); +// +// $config['dir.src'] = Path::clean($config['dir.src']); + + // Push container + $this->container = $container; + + parent::__construct($io, $config); + } + + /** + * Execute the controller. + * + * @return boolean True if controller finished execution, false if the controller did not + * finish execution. A controller might return false if some precondition for + * the controller to run has not been satisfied. + * + * @throws \LogicException + * @throws \RuntimeException + */ + public function execute() + { + $package = $this->io->getArgument(0, new ValidatePrompter('Enter package name: ')); + $class = $this->io->getArgument(1, new ValidatePrompter('Enter class name: ')); + $class = StringNormalise::toClassNamespace($class); + $target = $this->io->getArgument(2, $package . '\\' . $class . 'Test'); + $target = StringNormalise::toClassNamespace($target); + $package = ucfirst($package); + + if (!class_exists($class)) + { + $class = 'Windwalker\\' . $package . '\\' . $class; + } + + if (!class_exists($class)) + { + $this->out('Class not exists: ' . $class); + + exit(); + } + + $replace = $this->replace; + + $ref = new \ReflectionClass($class); + + $replace['origin.class.dir'] = dirname($ref->getFileName()); + $replace['origin.class.file'] = $ref->getFileName(); + $replace['origin.class.name'] = $ref->getName(); + $replace['origin.class.shortname'] = $ref->getShortName(); + $replace['origin.class.namespace'] = $ref->getNamespaceName(); + + $replace['test.dir'] = WINDWALKER_ROOT . DIRECTORY_SEPARATOR . 'test'; + + $replace['test.class.name'] = 'Windwalker\\Test\\' . $target; + $replace['test.class.file'] = Path::clean($replace['test.dir'] . DIRECTORY_SEPARATOR . $target . '.php'); + $replace['test.class.dir'] = dirname($replace['test.class.file']); + $replace['test.class.shortname'] = $this->getShortname(StringNormalise::toClassNamespace($replace['test.class.name'])); + $replace['test.class.namespace'] = $this->getNamespace($replace['test.class.name']); + + $this->replace = $replace; + + $config = new Registry; + + // Set replace to config. + foreach ($this->replace as $key => $val) + { + $config->set('replace.' . $key, $val); + } + + $methods = $ref->getMethods(\ReflectionMethod::IS_PUBLIC); + $methodTmpl = file_get_contents(GENERATOR_BUNDLE_PATH . '/Template/test/testMethod.php'); + $methodCodes = array(); + + foreach ($methods as $method) + { + $config['replace.origin.method'] = $method->getName(); + $config['replace.test.method'] = ucfirst($method->getName()); + + $methodCodes[] = SimpleTemplate::render($methodTmpl, $config->get('replace')); + } + + $config['replace.test.methods'] = implode("", $methodCodes); + + $this->replace = $config->get('replace'); + $this->config = $config; + + $this->doAction(new GenClassAction); + + $this->out('Generate test class: ' . $replace['test.class.name'] . ' to file: ' . $replace['test.class.file'])->out(); + + return true; + } + + /** + * getShortname + * + * @param string $class + * + * @return mixed + */ + protected function getShortname($class) + { + $class = explode('\\', $class); + + return array_pop($class); + } + + /** + * getNamespace + * + * @param string $class + * + * @return string + */ + protected function getNamespace($class) + { + $class = explode('\\', $class); + + array_pop($class); + + return implode('\\', $class); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Test/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Test/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/Test/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/TestGeneratorController.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/TestGeneratorController.php new file mode 100644 index 00000000..7d19f2db --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/TestGeneratorController.php @@ -0,0 +1,55 @@ +container, $this->io, new Registry($config)); + + return $controller->execute(); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Controller/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/FileOperator/ConvertOperator.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/FileOperator/ConvertOperator.php new file mode 100644 index 00000000..86e92854 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/FileOperator/ConvertOperator.php @@ -0,0 +1,48 @@ +io->out('File exists: ' . $dest); + } + else + { + $content = strtr(file_get_contents($src), $replace); + + if (File::write($dest, $content)) + { + $this->io->out('File created: ' . $dest); + } + } + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/FileOperator/CopyOperator.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/FileOperator/CopyOperator.php new file mode 100644 index 00000000..ee2226cf --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/FileOperator/CopyOperator.php @@ -0,0 +1,51 @@ +io->out('File exists: ' . $dest); + } + else + { + $content = SimpleTemplate::render(file_get_contents($src), $replace); + + if (File::write($dest, $content)) + { + $this->io->out('File created: ' . $dest); + } + } + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/FileOperator/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/FileOperator/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/FileOperator/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/GeneratorBundle.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/GeneratorBundle.php new file mode 100644 index 00000000..3affbdcd --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/GeneratorBundle.php @@ -0,0 +1,22 @@ + 'component', + 'mod_' => 'module', + 'plg_' => 'plugin', + // 'lib_' => 'library', + // 'tpl_' => 'template' + ); + + /** + * Get callable handler. + * + * @return callable The validate callback. + * + * @since 1.0 + */ + public function getHandler() + { + $handler = parent::getHandler(); + + return function($value) use ($handler) + { + if (!call_user_func($handler, $value)) + { + return false; + } + + $prefix = substr($value, 0, 4); + + return $this->validateExtType($prefix); + }; + } + + /** + * getExtType + * + * @param string $prefix + * + * @return mixed + */ + protected function validateExtType($prefix) + { + if (empty($this->extMapper[$prefix])) + { + return false; + } + + return true; + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Prompter/NotNullPrompter.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Prompter/NotNullPrompter.php new file mode 100644 index 00000000..10c3087c --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Prompter/NotNullPrompter.php @@ -0,0 +1,70 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Provider/GeneratorBundleProvider.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Provider/GeneratorBundleProvider.php new file mode 100644 index 00000000..74b24d4d --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Provider/GeneratorBundleProvider.php @@ -0,0 +1,58 @@ +command = $command; + } + + /** + * Registers the service provider with a DI container. + * + * @param Container $container The DI container. + * + * @return Container Returns itself to support chaining. + * + * @since 1.0 + */ + public function register(Container $container) + { + $ioClass = 'GeneratorBundle\\IO\\IO'; + + $container->alias('io', $ioClass) + ->alias('Muse\\IO\\IO', $ioClass) + ->alias('Muse\\IO\\IOInterface', $ioClass) + ->share($ioClass, new IO($this->command)); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Provider/OperatorProvider.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Provider/OperatorProvider.php new file mode 100644 index 00000000..20ec3ec8 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Provider/OperatorProvider.php @@ -0,0 +1,38 @@ +alias('operator.copy', 'GeneratorBundle\\FileOperator\\CopyOperator') + ->buildSharedObject('GeneratorBundle\\FileOperator\\CopyOperator'); + + $container->alias('operator.convert', 'GeneratorBundle\\FileOperator\\ConvertOperator') + ->buildSharedObject('GeneratorBundle\\FileOperator\\ConvertOperator'); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Provider/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Provider/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Provider/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/access.xml b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/access.xml new file mode 100644 index 00000000..8a0c7ca9 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/access.xml @@ -0,0 +1,40 @@ + + +
+ + + + + + + + + +
+
+ + + + + +
+
+ + + +
+
+ + + + + + +
+
+ + + + +
+
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/asset/css/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/asset/css/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/asset/css/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/asset/css/main.css b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/asset/css/main.css new file mode 100644 index 00000000..f8a2ff6f --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/asset/css/main.css @@ -0,0 +1,33 @@ +/*! + * {{extension.element.lower}} + * + * Copyright 2016 {ORGANIZATION} + * License GNU General Public License version 2 or later. + */ + +/* GLOBAL */ + + +/* BODY */ + + +/* TYPO */ + + +/* LAYOUT */ + + +/* CONTENT */ + + +/* FILTER */ + + +/* TABLE */ + + +/* FORM */ + + +/* FOOTER */ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/asset/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/asset/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/asset/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/asset/js/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/asset/js/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/asset/js/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/asset/js/main.js b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/asset/js/main.js new file mode 100644 index 00000000..0ac64fbc --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/asset/js/main.js @@ -0,0 +1,8 @@ +/** + * @package Joomla.Administrator + * @subpackage {{extension.element.lower}} + * @copyright Copyright (C) 2016 {ORGANIZATION}. All rights reserved. + * @license GNU General Public License version 2 or later. + */ + +var {{extension.name.cap}} = {}; diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/component.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/component.php new file mode 100644 index 00000000..efa14f3f --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/component.php @@ -0,0 +1,36 @@ + + +
+ + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ +
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/controller/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/controller/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/controller/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/controller/{{controller.item.name.lower}}/delegator.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/controller/{{controller.item.name.lower}}/delegator.php new file mode 100644 index 00000000..ebd936a9 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/controller/{{controller.item.name.lower}}/delegator.php @@ -0,0 +1,44 @@ +config['allow_url_params'] = array( + 'type' + ); + + return parent::createController($class); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/controller/{{controller.item.name.lower}}/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/controller/{{controller.item.name.lower}}/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/controller/{{controller.item.name.lower}}/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/controller/{{controller.list.name.lower}}/delegator.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/controller/{{controller.list.name.lower}}/delegator.php new file mode 100644 index 00000000..df851ed4 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/controller/{{controller.list.name.lower}}/delegator.php @@ -0,0 +1,40 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/etc/config.dist.yml b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/etc/config.dist.yml new file mode 100644 index 00000000..657071c9 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/etc/config.dist.yml @@ -0,0 +1,3 @@ +systyem: + debug: true + develement: true diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/etc/config.json b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/etc/config.json new file mode 100644 index 00000000..f09ade0b --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/etc/config.json @@ -0,0 +1,6 @@ +{ + "system" : { + "debug" : true, + "development" : true + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/etc/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/etc/index.html new file mode 100644 index 00000000..42682b47 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/etc/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/helper/helper.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/helper/helper.php new file mode 100644 index 00000000..c34f6fb4 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/helper/helper.php @@ -0,0 +1,223 @@ +isClient('administrator')) + { + JHtmlSidebar::addEntry( + Text::_('JCATEGORY'), + 'index.php?option=com_categories&extension={{extension.element.lower}}', + $vName === 'categories' + ); + + if (ComponentHelper::isEnabled('com_fields')) + { + JHtmlSidebar::addEntry( + Text::_('JGLOBAL_FIELDS'), + 'index.php?option=com_fields&context={{extension.element.lower}}.{{controller.item.name.lower}}', + $vName === 'fields.fields' + ); + JHtmlSidebar::addEntry( + Text::_('JGLOBAL_FIELD_GROUPS'), + 'index.php?option=com_fields&view=groups&context={{extension.element.lower}}.{{controller.item.name.lower}}', + $vName === 'fields.groups' + ); + } + } + + foreach (new \DirectoryIterator(JPATH_ADMINISTRATOR . '/components/{{extension.element.lower}}/view') as $folder) + { + if ($folder->isDir() && $inflector->isPlural($view = $folder->getBasename())) + { + JHtmlSidebar::addEntry( + Text::sprintf(sprintf('{{extension.element.upper}}_%s_TITLE_LIST', strtoupper($folder))), + 'index.php?option={{extension.element.lower}}&view=' . $view, + $vName === $view + ); + } + } + + $dispatcher = \JEventDispatcher::getInstance(); + $dispatcher->trigger('onAfterAddSubmenu', array('{{extension.element.lower}}', $vName)); + } + + /** + * Adds Count Items for Category Manager. + * + * @param stdClass[] &$items The banner category objects + * + * @return stdClass[] + * + * @throws \RuntimeException + * + * @since 1.0 + */ + public static function countItems(&$items) + { + $db = Factory::getDbo(); + + foreach ($items as $item) + { + $item->count_trashed = 0; + $item->count_archived = 0; + $item->count_unpublished = 0; + $item->count_published = 0; + + $query = $db->getQuery(true); + + $query->select('state, count(*) AS count') + ->from($query->quoteName('#__{{extension.name.lower}}_{{controller.list.name.lower}}')) + ->where('catid = ' . (int) $item->id) + ->group('state'); + + $db->setQuery($query); + + $elements = (array) $db->loadObjectList(); + + foreach ($elements as $element) + { + switch ($element->state) { + case 0: + $item->count_unpublished = $element->count; + break; + + case 1: + $item->count_published = $element->count; + break; + + case 2: + $item->count_archived = $element->count; + break; + + case -2: + $item->count_trashed = $element->count; + break; + } + } + } + + return $items; + } + + /** + * Gets a list of the actions that can be performed. + * + * @param string $option Action option. + * + * @return CMSObject + */ + public static function getActions($option = '{{extension.element.lower}}') + { + $user = Factory::getUser(); + $result = new CMSObject; + + $actions = array( + 'core.admin', + 'core.options', + 'core.manage', + 'core.create', + 'core.delete', + 'core.edit', + 'core.edit.state', + 'core.edit.own', + 'core.edit.value', + ); + + foreach ($actions as $action) + { + $result->set($action, $user->authorise($action, $option)); + } + + return $result; + } + + /** + * Returns a valid section for articles. If it is not valid then null + * is returned. + * + * @param string $section The section to get the mapping for + * + * @return string|null The new section + * + * @since 1.0 + * + * @throws Exception + */ + public static function validateSection($section) + { + if (Factory::getApplication()->isClient('site')) + { + // On the front end we need to map some sections + switch ($section) + { + // Map to {{controller.item.name.lower}} + case '{{controller.item.name.lower}}': + case '{{controller.list.name.lower}}': + $section = '{{controller.item.name.lower}}'; + break; + + default: + $section = null; + } + } + + return $section; + } + + /** + * Returns valid contexts + * + * @return array + * + * @since 1.0 + */ + public static function getContexts() + { + Factory::getLanguage()->load('com_content', JPATH_ADMINISTRATOR); + + $contexts = array( + '{{extension.element.lower}}.{{controller.item.name.lower}}' => Text::_('{{extension.element.upper}}_VIEW_{{controller.item.name.upper}}'), + '{{extension.element.lower}}.categories' => Text::_('JCATEGORY'), + + // Add more group here... + ); + + return $contexts; + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/helper/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/helper/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/helper/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/helpers/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/helpers/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/helpers/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/helpers/{{extension.name.lower}}.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/helpers/{{extension.name.lower}}.php new file mode 100644 index 00000000..b1bc9f7c --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/helpers/{{extension.name.lower}}.php @@ -0,0 +1,11 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/images/{{extension.element.lower}}_logo.png b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/images/{{extension.element.lower}}_logo.png new file mode 100644 index 00000000..fb6ae69b Binary files /dev/null and b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/images/{{extension.element.lower}}_logo.png differ diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/index.html new file mode 100644 index 00000000..42682b47 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/install.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/install.php new file mode 100644 index 00000000..979039ba --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/install.php @@ -0,0 +1,115 @@ +getParent(); + $installer = new Installer; + $manifest = $pInstaller->manifest; + $path = $pInstaller->getPath('source'); + $result = array(); + + $css = << +#ak-install-img +{ +} + +#ak-install-msg +{ +} + +HTML; + + echo $css; + + $installScript = dirname($path) . '/windwalker/src/System/installscript.php'; + + if (!is_file($installScript)) + { + $installScript = JPATH_LIBRARIES . '/windwalker/src/System/installscript.php'; + } + + include $installScript; + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/language/en-GB/en-GB.{{extension.element.lower}}.ini b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/language/en-GB/en-GB.{{extension.element.lower}}.ini new file mode 100644 index 00000000..628274b1 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/language/en-GB/en-GB.{{extension.element.lower}}.ini @@ -0,0 +1,98 @@ +; {ORGANIZATION} Extension +; Copyright (C) 2012 {ORGANIZATION}. All rights reserved. +; License GNU General Public License version 2 or later., see LICENSE.php +; Note : All ini files need to be saved as UTF-8 - No BOM + +COM_CONFIG_CATEGORY_FIELDSET_LABEL="Category Config" +COM_CONFIG_ITEM_FIELDSET_LABEL="Item Config" +{{extension.element.upper}}="{{extension.name.cap}}" +{{extension.element.upper}}_ACCESS_HEADING="Access" +{{extension.element.upper}}_BATCH_OPTIONS="Batch Options" +{{extension.element.upper}}_BATCH_TIP="If choosing to copy an item, any other actions selected will be applied to the copied item. Otherwise, all actions are applied to the selected item." +{{extension.element.upper}}_CHANGE_ITEM="Change item." +{{extension.element.upper}}_CHANGE_ITEM_BUTTON="Change item." +{{extension.element.upper}}_COMPONENT_DESC="Basic Component config." +{{extension.element.upper}}_COMPONENT_LABEL="Basic" +{{extension.element.upper}}_CONFIGURATION="{{extension.name.cap}} Configuration" +{{extension.element.upper}}_CREATED="Created" +{{extension.element.upper}}_CREATED_BY="Author" +{{extension.element.upper}}_CREATED_BY_DESC="Author" +{{extension.element.upper}}_CREATED_DESC="Select created time." +{{extension.element.upper}}_EDIT_FIELDS_ADVANCED="Advanced" +{{extension.element.upper}}_EDIT_FIELDS_BASIC="Basic" +{{extension.element.upper}}_EDIT_FIELDS_RULES="Access" +{{extension.element.upper}}_EDIT_FIELDSET_CREATED="Created" +{{extension.element.upper}}_EDIT_FIELDSET_INFORMATION="Information" +{{extension.element.upper}}_EDIT_FIELDSET_PUBLISH="Publishing" +{{extension.element.upper}}_EDIT_FIELDSET_RULES="Access Rules" +{{extension.element.upper}}_EDIT_FIELDSET_TEXT="Text" +{{extension.element.upper}}_EDIT_TAB_ADVANCED="Advanced" +{{extension.element.upper}}_EDIT_TAB_BASIC="Basic" +{{extension.element.upper}}_EDIT_TAB_RULES="Access" +{{extension.element.upper}}_FIELD_ID="ID" +{{extension.element.upper}}_FIELD_ORDER="Order" +{{extension.element.upper}}_FIELD_ORDER_DESC="Item ordering rules." +{{extension.element.upper}}_FIELDSET_RULES="Rules" +{{extension.element.upper}}_FILTER_NOTE_GENERAL="General Filter" +{{extension.element.upper}}_FULLTEXT="Content" +{{extension.element.upper}}_FULLTEXT_DESC="Type your content here." +{{extension.element.upper}}_IMAGES="Image" +{{extension.element.upper}}_IMAGES_DESC="Press here to upload images." +{{extension.element.upper}}_INTROTEXT="Introduction" +{{extension.element.upper}}_INTROTEXT_DESC="Type youre intro here." +{{extension.element.upper}}_ITEM_SETTINGS="Item Setting" +{{extension.element.upper}}_LINKED_TITLES_IN_LIST="Linked title in list" +{{extension.element.upper}}_LINKED_TITLES_IN_LIST_DESC="Linked title in list" +{{extension.element.upper}}_MODAL_NO_SELECT="- No Select -" +{{extension.element.upper}}_MODIFIED="Modified" +{{extension.element.upper}}_MORE_LINKS="More links" +{{extension.element.upper}}_N_ITEMS_ARCHIVED="%d items successfully archived" +{{extension.element.upper}}_N_ITEMS_ARCHIVED_1="%d item successfully archived" +{{extension.element.upper}}_N_ITEMS_CHECKED_IN_0="No item successfully checked in" +{{extension.element.upper}}_N_ITEMS_CHECKED_IN_1="%d item successfully checked in" +{{extension.element.upper}}_N_ITEMS_CHECKED_IN_MORE="%d items successfully checked in" +{{extension.element.upper}}_N_ITEMS_DELETED="%d items successfully deleted" +{{extension.element.upper}}_N_ITEMS_DELETED_1="%d item successfully deleted" +{{extension.element.upper}}_N_ITEMS_PUBLISHED="%d items successfully published" +{{extension.element.upper}}_N_ITEMS_PUBLISHED_1="%d item successfully published" +{{extension.element.upper}}_N_ITEMS_TRASHED="%d items successfully trashed" +{{extension.element.upper}}_N_ITEMS_TRASHED_1="%d item successfully trashed" +{{extension.element.upper}}_N_ITEMS_UNPUBLISHED="%d items successfully unpublished" +{{extension.element.upper}}_N_ITEMS_UNPUBLISHED_1="%d item successfully unpublished" +{{extension.element.upper}}_NO_ITEM_SELECTED="No items selected" +{{extension.element.upper}}_NUM_INTRO_ITEMS="# Intro Items" +{{extension.element.upper}}_NUM_INTRO_ITEMS_DESC="Number of intro items." +{{extension.element.upper}}_NUM_LEADING_ITEMS="# Leading Items" +{{extension.element.upper}}_NUM_LEADING_ITEMS_DESC="Number of leading items." +{{extension.element.upper}}_ORDER_DIR="Direction" +{{extension.element.upper}}_ORDER_DIR_ASC="ASC" +{{extension.element.upper}}_ORDER_DIR_DESC="DESC" +{{extension.element.upper}}_ORDER_DIR_DESCRIPTION="Use ASC or DESC to sort items." +{{extension.element.upper}}_ORDERING="Ordering" +{{extension.element.upper}}_PARENT_ITEM="Parent Item" +{{extension.element.upper}}_PARENT_ITEM_DESC="Select parent item." +{{extension.element.upper}}_PUBLISH_DOWN="Finish Publishing" +{{extension.element.upper}}_PUBLISH_DOWN_DESC="Finish Publishing Time." +{{extension.element.upper}}_PUBLISH_UP="Start Publishing" +{{extension.element.upper}}_PUBLISH_UP_DESC="Start publishing time." +{{extension.element.upper}}_READMORE="Readmore" +{{extension.element.upper}}_REBUILD="Rebuild" +{{extension.element.upper}}_REBUILD_FAILURE="Rebuild failure." +{{extension.element.upper}}_REBUILD_SUCCESS="Rebuild success." +{{extension.element.upper}}_SAVE_SUCCESS="Item successfully saved" +{{extension.element.upper}}_SELECT_ITEM="Select item." +{{extension.element.upper}}_TITLE_ITEM_EDIT="Edit" +{{extension.element.upper}}_TITLE_LIST="List" +{{extension.element.upper}}_TITLE_UNCATEGORISED="Uncategorised" +{{extension.element.upper}}_URL="URL" +{{extension.element.upper}}_URL_DESC="Enter url here." +JFIELD_ALT_LAYOUT="View Layout" + +; {{controller.item.name.cap}} +{{extension.element.upper}}_VIEW_{{controller.item.name.upper}}="{{controller.item.name.cap}}" +{{extension.element.upper}}_VIEW_{{controller.list.name.upper}}="{{controller.list.name.cap}}" +{{extension.element.upper}}_SELECT_{{controller.item.name.upper}}="Select {{controller.item.name.cap}}" +{{extension.element.upper}}_SELECT_{{controller.item.name.upper}}_DESC="Select {{controller.item.name.cap}}" +{{extension.element.upper}}_{{controller.list.name.upper}}_VIEW_DEFAULT_OPTION="Default" +{{extension.element.upper}}_{{controller.list.name.upper}}_TITLE_LIST="{{controller.item.name.cap}} List" +{{extension.element.upper}}_{{controller.item.name.upper}}_TITLE_ITEM_EDIT="{{controller.item.name.cap}} Item Edit" diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/language/en-GB/en-GB.{{extension.element.lower}}.sys.ini b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/language/en-GB/en-GB.{{extension.element.lower}}.sys.ini new file mode 100644 index 00000000..2b8c3071 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/language/en-GB/en-GB.{{extension.element.lower}}.sys.ini @@ -0,0 +1,16 @@ +; {ORGANIZATION} Extension +; Copyright (C) 2012 {ORGANIZATION}. All rights reserved. +; License GNU General Public License version 2 or later., see LICENSE.php +; Note : All ini files need to be saved as UTF-8 - No BOM + +{{extension.element.upper}}="{{extension.name.cap}}" +{{extension.name.upper}}="{{extension.name.cap}}" +{{extension.element.upper}}_XML_DESCRIPTION="" +{{extension.element.upper}}_INSTALL_MSG="{{extension.name.cap}} Component" +{{extension.element.upper}}_LIST_VIEW_DESC="List items." +{{extension.element.upper}}_ITEM_VIEW_DEFAULT_DESC="Show single item." + +; {{controller.item.name.cap}} +{{extension.element.upper}}_{{controller.list.name.upper}}="{{controller.list.name.cap}}" +{{extension.element.upper}}_{{controller.item.name.upper}}_VIEW_DEFAULT_TITLE="{{controller.item.name.cap}} Item" +{{extension.element.upper}}_{{controller.list.name.upper}}_VIEW_DEFAULT_TITLE="{{controller.list.name.cap}} List" diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/language/en-GB/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/language/en-GB/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/language/en-GB/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/language/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/language/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/language/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/language/zh-TW/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/language/zh-TW/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/language/zh-TW/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/language/zh-TW/zh-TW.{{extension.element.lower}}.ini b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/language/zh-TW/zh-TW.{{extension.element.lower}}.ini new file mode 100644 index 00000000..e342269d --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/language/zh-TW/zh-TW.{{extension.element.lower}}.ini @@ -0,0 +1,100 @@ +; {ORGANIZATION} Extension +; Copyright (C) 2012 {ORGANIZATION}. All rights reserved. +; License GNU General Public License version 2 or later., see LICENSE.php +; Note : All ini files need to be saved as UTF-8 - No BOM +; ------------------------------------------------- + +COM_CONFIG_CATEGORY_FIELDSET_LABEL="分類顯示設定" +COM_CONFIG_ITEM_FIELDSET_LABEL="項目顯示設定" +{{extension.element.upper}}="{{extension.name.cap}} 元件" +{{extension.element.upper}}_ACCESS_HEADING="Access" +{{extension.element.upper}}_BATCH_OPTIONS="批量處理選定的項目" +{{extension.element.upper}}_BATCH_TIP="如果選擇要複製一個項目,其他選擇的動作將會套用到複製的項目。除此之外,所有動作將會套用到選擇的項目。" +{{extension.element.upper}}_CHANGE_ITEM="更換項目" +{{extension.element.upper}}_CHANGE_ITEM_BUTTON="按此更改項目" +{{extension.element.upper}}_COMPONENT_DESC="這裡是基礎設定" +{{extension.element.upper}}_COMPONENT_LABEL="基礎設定" +{{extension.element.upper}}_CONFIGURATION="{{extension.name.cap}} 元件設定" +{{extension.element.upper}}_CREATED="建立時間" +{{extension.element.upper}}_CREATED_BY="建立者" +{{extension.element.upper}}_CREATED_BY_DESC="建立者" +{{extension.element.upper}}_CREATED_DESC="選擇建立時間" +{{extension.element.upper}}_EDIT_FIELDS_ADVANCED="進階" +{{extension.element.upper}}_EDIT_FIELDS_BASIC="一般" +{{extension.element.upper}}_EDIT_FIELDS_RULES="權限" +{{extension.element.upper}}_EDIT_FIELDSET_CREATED="建立資訊" +{{extension.element.upper}}_EDIT_FIELDSET_INFORMATION="一般資訊" +{{extension.element.upper}}_EDIT_FIELDSET_PUBLISH="發佈資訊" +{{extension.element.upper}}_EDIT_FIELDSET_RULES="權限設定" +{{extension.element.upper}}_EDIT_FIELDSET_TEXT="內文設定" +{{extension.element.upper}}_EDIT_TAB_ADVANCED="進階" +{{extension.element.upper}}_EDIT_TAB_BASIC="一般" +{{extension.element.upper}}_EDIT_TAB_RULES="權限" +{{extension.element.upper}}_FIELD_ID="編號 ID" +{{extension.element.upper}}_FIELD_ORDER="排序" +{{extension.element.upper}}_FIELD_ORDER_DESC="排序的欄位規則。" +{{extension.element.upper}}_FIELDSET_RULES="項目權限設定" +{{extension.element.upper}}_FILTER_NOTE_GENERAL="基本過濾選項" +{{extension.element.upper}}_FULLTEXT="全文" +{{extension.element.upper}}_FULLTEXT_DESC="在這裡輸入全文" +{{extension.element.upper}}_ID="ID" +{{extension.element.upper}}_IMAGES="圖片" +{{extension.element.upper}}_IMAGES_DESC="按此選擇上傳圖片" +{{extension.element.upper}}_INTROTEXT="摘要文字" +{{extension.element.upper}}_INTROTEXT_DESC="在此輸入摘要文字" +{{extension.element.upper}}_ITEM_SETTINGS="項目設定" +{{extension.element.upper}}_LINKED_TITLES_IN_LIST="分類頁面項目標題超連結" +{{extension.element.upper}}_LINKED_TITLES_IN_LIST_DESC="項目標題超連結" +{{extension.element.upper}}_MODAL_NO_SELECT="- 不選擇 -" +{{extension.element.upper}}_MODIFIED="最後更新" +{{extension.element.upper}}_MORE_LINKS="更多項目" +{{extension.element.upper}}_N_ITEMS_ARCHIVED="%d 個項目成功封存" +{{extension.element.upper}}_N_ITEMS_ARCHIVED_1="%d 個項目成功封存" +{{extension.element.upper}}_N_ITEMS_CHECKED_IN_0="沒有項目被檢入" +{{extension.element.upper}}_N_ITEMS_CHECKED_IN_1="%d 個項目被檢入" +{{extension.element.upper}}_N_ITEMS_CHECKED_IN_MORE="%d 個項目被檢入" +{{extension.element.upper}}_N_ITEMS_DELETED="%d 個項目成功刪除" +{{extension.element.upper}}_N_ITEMS_DELETED_1="%d 個項目成功刪除" +{{extension.element.upper}}_N_ITEMS_PUBLISHED="%d 個項目成功啟用" +{{extension.element.upper}}_N_ITEMS_PUBLISHED_1="%d 個項目成功啟用" +{{extension.element.upper}}_N_ITEMS_TRASHED="%d 個項目被放入垃圾桶" +{{extension.element.upper}}_N_ITEMS_TRASHED_1="%d 個項目被放入垃圾桶" +{{extension.element.upper}}_N_ITEMS_UNPUBLISHED="%d 個項目成功關閉" +{{extension.element.upper}}_N_ITEMS_UNPUBLISHED_1="%d 個項目成功關閉" +{{extension.element.upper}}_NO_ITEM_SELECTED="沒有項目被選取" +{{extension.element.upper}}_NUM_INTRO_ITEMS="# 摘要項目數" +{{extension.element.upper}}_NUM_INTRO_ITEMS_DESC="每個頁面顯示的摘要項目數量,會根據欄位數量排列。" +{{extension.element.upper}}_NUM_LEADING_ITEMS="# 重點項目數" +{{extension.element.upper}}_NUM_LEADING_ITEMS_DESC="摘要前的重點項目數量,不會分欄。" +{{extension.element.upper}}_ORDER_DIR="正反序" +{{extension.element.upper}}_ORDER_DIR_ASC="正序" +{{extension.element.upper}}_ORDER_DIR_DESC="反序" +{{extension.element.upper}}_ORDER_DIR_DESCRIPTION="用升冪或降冪排序" +{{extension.element.upper}}_ORDERING="排列順序" +{{extension.element.upper}}_PARENT_ITEM="上層項目" +{{extension.element.upper}}_PARENT_ITEM_DESC="選擇上層項目" +{{extension.element.upper}}_PUBLISH_DOWN="停止發佈時間" +{{extension.element.upper}}_PUBLISH_DOWN_DESC="停止發佈時間" +{{extension.element.upper}}_PUBLISH_UP="開始發佈時間" +{{extension.element.upper}}_PUBLISH_UP_DESC="開始發佈時間" +{{extension.element.upper}}_READMORE="閱讀更多" +{{extension.element.upper}}_REBUILD="重建" +{{extension.element.upper}}_REBUILD_FAILURE="重建失敗" +{{extension.element.upper}}_REBUILD_SUCCESS="重建成功" +{{extension.element.upper}}_SAVE_SUCCESS="項目成功儲存" +{{extension.element.upper}}_SELECT_ITEM="選擇項目" +{{extension.element.upper}}_TITLE_ITEM_EDIT="項目編輯" +{{extension.element.upper}}_TITLE_LIST="列表管理" +{{extension.element.upper}}_TITLE_UNCATEGORISED="未分類" +{{extension.element.upper}}_URL="網址" +{{extension.element.upper}}_URL_DESC="在此填入網址" +JFIELD_ALT_LAYOUT="View 版面" + +; {{controller.item.name.cap}} +{{extension.element.upper}}_VIEW_{{controller.item.name.upper}}="{{controller.item.name.cap}}" +{{extension.element.upper}}_VIEW_{{controller.list.name.upper}}="{{controller.list.name.cap}}" +{{extension.element.upper}}_SELECT_{{controller.item.name.upper}}="選擇 {{controller.item.name.cap}}" +{{extension.element.upper}}_SELECT_{{controller.item.name.upper}}_DESC="按這裡即可選擇 {{controller.item.name.cap}}" +{{extension.element.upper}}_{{controller.list.name.upper}}_VIEW_DEFAULT_OPTION="預設" +{{extension.element.upper}}_{{controller.list.name.upper}}_TITLE_LIST="{{controller.item.name.cap}} 列表管理" +{{extension.element.upper}}_{{controller.item.name.upper}}_TITLE_ITEM_EDIT="{{controller.item.name.cap}} 項目編輯" diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/language/zh-TW/zh-TW.{{extension.element.lower}}.sys.ini b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/language/zh-TW/zh-TW.{{extension.element.lower}}.sys.ini new file mode 100644 index 00000000..6e82fe61 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/language/zh-TW/zh-TW.{{extension.element.lower}}.sys.ini @@ -0,0 +1,16 @@ +; {ORGANIZATION} Extension +; Copyright (C) 2012 {ORGANIZATION}. All rights reserved. +; License GNU General Public License version 2 or later., see LICENSE.php +; Note : All ini files need to be saved as UTF-8 - No BOM + +{{extension.element.upper}}="{{extension.name.cap}} 元件" +{{extension.name.upper}}="{{extension.name.cap}} 元件" +{{extension.element.upper}}_XML_DESCRIPTION="" +{{extension.element.upper}}_INSTALL_MSG="這是 {{extension.name.cap}} 元件。" +{{extension.element.upper}}_LIST_VIEW_DESC="列出項目" +{{extension.element.upper}}_ITEM_VIEW_DEFAULT_DESC="顯示單一項目" + +; {{controller.item.name.cap}} +{{extension.element.upper}}_{{controller.list.name.upper}}="{{controller.list.name.cap}}" +{{extension.element.upper}}_{{controller.item.name.upper}}_VIEW_DEFAULT_TITLE="{{controller.item.name.cap}} 單一項目" +{{extension.element.upper}}_{{controller.list.name.upper}}_VIEW_DEFAULT_TITLE="{{controller.list.name.cap}} 列表" diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/field/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/field/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/field/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/field/{{controller.item.name.lower}}/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/field/{{controller.item.name.lower}}/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/field/{{controller.item.name.lower}}/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/field/{{controller.item.name.lower}}/list.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/field/{{controller.item.name.lower}}/list.php new file mode 100644 index 00000000..6854e8e6 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/field/{{controller.item.name.lower}}/list.php @@ -0,0 +1,64 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/form/{{controller.item.name.lower}}.xml b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/form/{{controller.item.name.lower}}.xml new file mode 100644 index 00000000..95d172ef --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/form/{{controller.item.name.lower}}.xml @@ -0,0 +1,198 @@ + +
+ + + + +
+ + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+ +
+ + + + + +
+ + + + +
+ +
+ + +
+ + + + + + + +
+ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/form/{{controller.list.name.lower}}/batch.xml b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/form/{{controller.list.name.lower}}/batch.xml new file mode 100644 index 00000000..0e5c53e2 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/form/{{controller.list.name.lower}}/batch.xml @@ -0,0 +1,59 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/form/{{controller.list.name.lower}}/filter.xml b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/form/{{controller.list.name.lower}}/filter.xml new file mode 100644 index 00000000..b74c646a --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/form/{{controller.list.name.lower}}/filter.xml @@ -0,0 +1,118 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/form/{{controller.list.name.lower}}/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/form/{{controller.list.name.lower}}/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/form/{{controller.list.name.lower}}/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/{{controller.item.name.lower}}.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/{{controller.item.name.lower}}.php new file mode 100644 index 00000000..02126f4a --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/model/{{controller.item.name.lower}}.php @@ -0,0 +1,111 @@ +addTable('{{controller.item.name.lower}}', '#__{{extension.name.lower}}_{{controller.list.name.lower}}') + ->addTable('category', '#__categories', '{{controller.item.name.lower}}.catid = category.id') + ->addTable('user', '#__users', '{{controller.item.name.lower}}.created_by = user.id') + ->addTable('viewlevel', '#__viewlevels', '{{controller.item.name.lower}}.access = viewlevel.id') + ->addTable('lang', '#__languages', '{{controller.item.name.lower}}.language = lang.lang_code'); + } + + /** + * The prepare getQuery hook + * + * @param JDatabaseQuery $query The db query object. + * + * @return void + */ + protected function prepareGetQuery(\JDatabaseQuery $query) + { + } + + /** + * The post getQuery object. + * + * @param JDatabaseQuery $query The db query object. + * + * @return void + */ + protected function postGetQuery(\JDatabaseQuery $query) + { + } + + /** + * Method to auto-populate the model state. + * + * This method will only called in constructor. Using `ignore_request` to ignore this method. + * + * @param string $ordering An optional ordering field. + * @param string $direction An optional direction (asc|desc). + * + * @return void + * + * @throws Exception + */ + protected function populateState($ordering = '{{controller.item.name.lower}}.id', $direction = 'DESC') + { + // Build ordering prefix + if (!$ordering) + { + $table = $this->getTable('{{controller.item.name.cap}}'); + + $ordering = property_exists($table, 'ordering') ? '{{controller.item.name.lower}}.ordering' : '{{controller.item.name.lower}}.id'; + + $ordering = property_exists($table, 'catid') ? '{{controller.item.name.lower}}.catid, ' . $ordering : $ordering; + } + + parent::populateState($ordering, $direction); + } + + /** + * Process the query filters. + * + * @param JDatabaseQuery $query The query object. + * @param array $filters The filters values. + * + * @return JDatabaseQuery The db query object. + * + * @throws Exception + */ + protected function processFilters(\JDatabaseQuery $query, $filters = array()) + { + // If no state filter, set published >= 0 + if (!isset($filters['{{controller.item.name.lower}}.state']) && property_exists($this->getTable(), 'state')) + { + $query->where($query->quoteName('{{controller.item.name.lower}}.state') . ' >= 0'); + } + + return parent::processFilters($query, $filters); + } + + /** + * Configure the filter handlers. + * + * Example: + * ``` php + * $filterHelper->setHandler( + * '{{controller.item.name.lower}}.date', + * function($query, $field, $value) + * { + * $query->where($field . ' >= ' . $value); + * } + * ); + * ``` + * + * @param FilterHelper $filterHelper The filter helper object. + * + * @return void + */ + protected function configureFilters($filterHelper) + { + } + + /** + * Configure the search handlers. + * + * Example: + * ``` php + * $searchHelper->setHandler( + * '{{controller.item.name.lower}}.title', + * function($query, $field, $value) + * { + * return $query->quoteName($field) . ' LIKE ' . $query->quote('%' . $value . '%'); + * } + * ); + * ``` + * + * @param SearchHelper $searchHelper The search helper object. + * + * @return void + */ + protected function configureSearches($searchHelper) + { + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/sql/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/sql/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/sql/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/sql/install.sql b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/sql/install.sql new file mode 100644 index 00000000..eaa2722c --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/sql/install.sql @@ -0,0 +1,41 @@ + +CREATE TABLE IF NOT EXISTS `#__{{extension.name.lower}}_{{controller.list.name.lower}}` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key', + `asset_id` int(11) NOT NULL COMMENT 'ACL Key', + `catid` int(11) NOT NULL COMMENT 'Category ID', + `title` varchar(255) NOT NULL COMMENT 'Record title', + `alias` varchar(255) NOT NULL COMMENT 'URL Alias', + `url` varchar(255) NOT NULL COMMENT 'URL', + `introtext` mediumtext NOT NULL COMMENT 'Intro', + `fulltext` mediumtext NOT NULL COMMENT 'Full content', + `images` text NOT NULL COMMENT 'Images', + `version` int(11) unsigned NOT NULL COMMENT 'Version', + `created` datetime NOT NULL COMMENT 'Created time', + `created_by` int(11) NOT NULL COMMENT 'Author', + `modified` datetime NOT NULL COMMENT 'Modified time', + `modified_by` int(11) NOT NULL COMMENT 'Modified user', + `ordering` int(11) NOT NULL COMMENT 'Ordering key', + `state` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Record state', + `publish_up` datetime NOT NULL COMMENT 'Publish start time', + `publish_down` datetime NOT NULL COMMENT 'Publish end time', + `checked_out` int(11) NOT NULL COMMENT 'Checkout user', + `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Checkout time', + `access` int(11) unsigned NOT NULL COMMENT 'Access viewlevels', + `language` char(7) NOT NULL COMMENT 'Language key', + `params` text NOT NULL COMMENT 'Params', + PRIMARY KEY (`id`), + KEY `idx_access` (`access`), + KEY `idx_alias` (`alias`), + KEY `idx_catid` (`catid`), + KEY `idx_language` (`language`), + KEY `idx_checkout` (`checked_out`), + KEY `cat_index` (`state`,`access`,`catid`), + KEY `idx_created_by` (`created_by`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ; + +INSERT INTO `#__{{extension.name.lower}}_{{controller.list.name.lower}}` (`id`, `asset_id`, `catid`, `title`, `alias`, `url`, `introtext`, `fulltext`, `images`, `version`, `created`, `created_by`, `modified`, `modified_by`, `ordering`, `state`, `publish_up`, `publish_down`, `checked_out`, `checked_out_time`, `access`, `language`, `params`) VALUES +(2, 0, 1, '雲彩裡,許是懺悔,她多疼你!', 'cloud-xu-repentance-her-pain-you', 'http://{ORGANIZATION}.com/', '

他們的獨子,他們的獨子,卻沒有同樣的碎痕,一般青的青草同在大地上生長,就是你媽,美慧,我只是悵惘,我心裡卻並不快爽;因為不僅見著他使我想起你,還是有人成心種著的?今天頭上已見星星的白髮;光陰帶走的往跡,在這道上遭受的,在你最初開口學話的日子,你去時也還是一個光亮,可以懂得我話裡意味的深淺,你應得躲避她像你躲避青草裡一條美麗的花蛇!

', '

可愛,說你聽著了音樂便異常的快活,竟可說是你有天賦的憑證,假如你長大的話,有時激起成章的波動,但我不僅不能盡我的責任,拘束永遠跟著我們,與我境遇相似或更不如的當不在少數,他就捲了起來,與你一撮的遺灰,梨夢湖與西子湖,體態的秀美,葛德說,你應得躲避她像你躲避青草裡一條美麗的花蛇!體態的秀美,我見著的只你的遺像,有時激起成章的波動,只要你一伸手就可以採取,想起怎不可傷?在這裡,前途是那裡,前途是那裡,怎樣你這小機靈早已看見,同時她們講你生前的故事,他拉著我的手,我們多長一歲年紀往往只是加重我們頭上的枷,我在一個地方聽音樂,與我境遇相似或更不如的當不在少數,因為在幾分鐘內我們已經是很好的朋友,但我們,你應得躲避她像你躲避青草裡一條美麗的花蛇!百靈與夜鶯,摸著了你的寶貝,也許是你自己種下的?

', 'images/sampledata/parks/landscape/250px_cradle_mountain_seen_from_barn_bluff.jpg', 0, '2012-09-08 14:04:41', 0, '2012-09-08 14:37:19', 0, 1, 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, '*', ''), +(3, 0, 1, '流,同在一個神奇的宇宙裡自得。', 'flow-with-contented-in-a-magical-universe', 'https://www.facebook.com', '

山勢與地形的起伏裡,的本領,體魄與性靈,而且往往因為他是從繁花的山林裡吹度過來他帶來一股幽遠的淡香,但她在她同樣不幸的境遇中證明她的智斷,站在漆黑的床邊,你得有力量翻起那岩石才能把它不傷損的連根起出誰知道那根長的多深!你在時我不知愛惜,他上年紀的臉上一定滿佈著笑容你的小腳踝上不曾碰著過無情的荊刺,他們承著你的體重卻不叫你記起你還有一雙腳在你的底下。

', '

可愛的小彼得,這樣的玩頂好是不要約伴,我怕我只能看作水面上的雲影,我不能恨,你的父親,就是你媽,你媽說,是貝德花芬是槐格納你就愛,尤在你永不須躊躇你的服色與體態;你不妨搖曳著一頭的蓬草,眼不盲,說你在坐車裡常常伸出你的小手在車欄上跟著音樂按拍;你稍大些會得淘氣的時候,她多疼你!今天已是壯年;昨天腮邊還帶著圓潤的笑渦,你盡可以不用領結,你在時我不知愛惜,我們唯一的權利,山勢與地形的起伏裡,一個不相識的小孩,知道你,山勢與地形的起伏裡,遠山上不起靄,親口嘗味,與你自己隨口的小曲,但你要它們的時候,一同聽台上的音樂。那才是你實際領受,你便蓋沒了你的小耳,這慈愛的甘液不能救活已經萎折了的鮮花,直到你的影像活現在我的眼前,我見著的只你的遺像,連著一息滋潤的水氣,覺著心裡有一個尖銳的刺痛,但這幾件故事已夠見證你小小的靈性裡早長著音樂的慧根。我心頭便湧起了不少的感想;我的話你是永遠聽不著了,是懺悔,那太可愛,但我想借這悼念你的機會,挫折時有鼓勵,與他同年齡的影子。

', 'images/sampledata/fruitshop/bananas_2.jpg', 0, '2012-09-08 14:12:04', 0, '2012-09-08 14:41:06', 0, 2, 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, '*', ''), +(4, 0, 1, '有時一澄到底的清澈,我只能問!', 'sometimes-a-cheng-clear-in-the-end-i-can-only-ask', 'http://www.joomla123.com.tw/', '

比如去一果子園,多謝你媽與你大大的慈愛與真摯,我心頭便湧起了不少的感想;我的話你是永遠聽不著了,卻不是來作客;我們是遭放逐,說你聽著了音樂便異常的快活,與我境遇相似或更不如的當不在少數,活潑的靈魂;你來人間真像是短期的作客,想起怎不可傷?我們唯一的權利,他說的話我不懂,你得有力量翻起那岩石才能把它不傷損的連根起出誰知道那根長的多深!

', '

流,比方說,把一個小花圈掛上你的門前那時間我,昨天我是個孩子,明知是自苦的揶揄,百靈與夜鶯,說你在坐車裡常常伸出你的小手在車欄上跟著音樂按拍;你稍大些會得淘氣的時候,那是最危險最專制不過的旅伴,你知道的是慈母的愛,像一個裸體的小孩撲入他母親的懷抱時,裝一個農夫,解嘲已往的一切。講,自由與自在的時候,我們見小孩子在草裡在沙堆裡在淺水裡打滾作樂,假如你單是站著看還不滿意時,但我不僅不能盡我的責任,可以恣嘗鮮味,更不提一般黃的黃麥,流入嫵媚的阿諾河去……並且你不但不須應伴,這不取費的最珍貴的補劑便永遠供你的受用;只要你認識了這一部書,反是這般不近情的冷漠?與他一樣,今天頭上已見星星的白髮;光陰帶走的往跡,它們又不在口邊;像是長在大塊岩石底下的嫩草,我猜想,你生前日常把弄的玩具小車,摩挲著你的顏面,光亮的天真,也不免加添他們的煩愁,你生前日常把弄的玩具小車,誰沒有恨,他那資質的敏慧,因為在幾分鐘內我們已經是很好的朋友,她多疼你!她們又講你怎樣喜歡拿著一根短棍站在桌上摹仿音樂會的導師,那才是你實際領受,是貝德花芬是槐格納你就愛,那無非是在同一個大牢裡從一間獄室移到另一間獄室去,美慧,我們真的羨慕,覺著心裡有一個尖銳的刺痛,還是有人成心種著的?

', 'images/sampledata/parks/animals/220px_spottedquoll_2005_seanmcclean.jpg', 0, '2012-09-08 14:15:15', 0, '2012-09-08 14:41:15', 0, 3, 1, '2017-09-08 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 2, '*', ''), +(5, 0, 1, '活潑,花草的顏色與香息裡尋得?', 'and-lively-the-color-of-{{extension.name.lower}}s-and-incense-bearing-years-have-found', 'http://ilovejoomla.tw/', '

這才初次明白曾經有一點血肉從我自己的生命裡分出,此外還有不少趣話,和風中,正像是去赴一個美的宴會,體態的秀美,她們又講你怎樣喜歡拿著一根短棍站在桌上摹仿音樂會的導師,在你最初開口學話的日子,他那資質的敏慧,平常我們從自己家裡走到朋友的家裡,反是這般不近情的冷漠?

', '

自然是最偉大的一部書,即使有,我在一個地方聽音樂,雲彩裡,就這單純的呼吸已是無窮的愉快;空氣總是明淨的,至少你不能完全抱怨荊棘,因此我有時想,她的忍耐,想中止也不可能,你媽已經寫信給我,平常我們從自己家裡走到朋友的家裡,但你應得帶書,同時她們講你生前的故事,還是有人成心種著的?同在和風中波動他們應用的符號是永遠一致的,還不止是難,想起怎不可傷?因為在幾分鐘內我們已經是很好的朋友,或是看見小貓追他自己的尾巴,極端的自私,流入嫵媚的阿諾河去……並且你不但不須應伴,比你住久的,你在時,給你應得的慈愛,也許是你自己種下的?我心頭便湧起了不少的感想;我的話你是永遠聽不著了,但你要它們的時候,你盡可以不用領結,上山或是下山,我只能問!體態的秀美,我們的鏈永遠是制定我們行動的上司!

', 'images/sampledata/parks/animals/200px_phyllopteryx_taeniolatus1.jpg', 0, '2012-09-08 14:16:31', 0, '2012-09-08 14:41:18', 0, 4, 1, '0000-00-00 00:00:00', '2010-09-08 00:00:00', 0, '0000-00-00 00:00:00', 3, '*', ''), +(6, 0, 1, '可愛,不是在你獨身漫步的時候。', 'cute-is-not-in-when-you-stroll-celibacy', 'http://funni.cc/', '

你才知道靈魂的愉快是怎樣的,愛你,雪西里與普陀山,像一個裸體的小孩撲入他母親的懷抱時,他的肖像也常受你小口的親吻,這時候想回頭已經太遲,學一個太平軍的頭目,所以只有你單身奔赴大自然的懷抱時,別管他模樣不佳,小鵝,誰沒有恨,你回到了天父的懷抱,近谷內不生煙,反是這般不近情的冷漠?

', '

你離開了媽的懷抱,在她有機會時,尤其是年輕的女伴,他年紀雖則小,也只有她,你就會在青草裡坐地仰臥,在這裡出門散步去,甚至有時打滾,也不免加添他們的煩愁,約莫八九歲光景,像一個裸體的小孩撲入他母親的懷抱時,有時激起成章的波動,竟許有人同情。山罅裡的泉響,你應得躲避她像你躲避青草裡一條美麗的花蛇!一般青的青草同在大地上生長,我手捧著那收存你遺灰的錫瓶,卻偏不作聲,再也不容追贖,你應得躲避她像你躲避青草裡一條美麗的花蛇!流,流,不如意的人生,今天已是壯年;昨天腮邊還帶著圓潤的笑渦,何嘗沒有羨慕的時候,是它們自己長著,給你應得的慈愛,我問為什麼,你的思想和著山壑間的水聲,是它們自己長著,陽光正好暖和,輕繞著你的肩腰,作客山中的妙處,誰沒有恨,與你自己隨口的小曲,要是中國的戲片,與他同年齡的影子。比你住久的,但我們的枷,她的忍耐,你媽說,可以懂得我話裡意味的深淺,加緊我們腳脛上的鏈,但我想借這悼念你的機會,你便蓋沒了你的小耳,光亮的天真,一經同伴的牴觸,你便乖乖的把琴抱進你的床去,他就捲了起來,葛德說,而且往往因為他是從繁花的山林裡吹度過來他帶來一股幽遠的淡香,是悵惘?

', 'images/sampledata/parks/landscape/180px_ormiston_pound.jpg', 0, '2012-09-08 14:26:08', 0, '2012-09-08 14:41:22', 0, 5, 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, '0000-00-00 00:00:00', 1, 'en-GB', ''); diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/sql/uninstall.sql b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/sql/uninstall.sql new file mode 100644 index 00000000..412473f1 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/sql/uninstall.sql @@ -0,0 +1 @@ +DROP TABLE `#__{{extension.name.lower}}_{{controller.list.name.lower}}`; \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/init.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/init.php new file mode 100644 index 00000000..8c960893 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/init.php @@ -0,0 +1,33 @@ +enqueueMessage('Windwalker Framework not found.', 'error'); + + return false; +} + +include_once JPATH_LIBRARIES . '/windwalker/src/init.php'; + +if (is_dir(JPATH_BASE . '/components/{{extension.element.lower}}')) +{ + JLoader::registerPrefix('{{extension.name.cap}}', JPATH_BASE . '/components/{{extension.element.lower}}'); + JLoader::register('{{extension.name.cap}}Component', JPATH_BASE . '/components/{{extension.element.lower}}/component.php'); +} + +JLoader::registerNamespace('{{extension.name.cap}}', JPATH_ADMINISTRATOR . '/components/{{extension.element.lower}}/src'); +JLoader::registerNamespace('Windwalker', __DIR__); + +return true; diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/Component/TaskMapper.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/Component/TaskMapper.php new file mode 100644 index 00000000..3597b233 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/Component/TaskMapper.php @@ -0,0 +1,32 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/Component/{{extension.name.cap}}Component.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/Component/{{extension.name.cap}}Component.php new file mode 100644 index 00000000..485d2eeb --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/Component/{{extension.name.cap}}Component.php @@ -0,0 +1,86 @@ +container->registerServiceProvider(new {{extension.name.cap}}Provider); + + // Load language + $lang = $this->container->get('language'); + + LanguageHelper::loadAll($lang->getTag(), $this->option); + + // Load asset + $asset = $this->container->get('helper.asset'); + + $asset->windwalker(); + + // Register tasks + TaskMapper::register($this); + + parent::prepare(); + } + + /** + * Post execute hook. + * + * @param mixed $result The return value of this component. + * + * @return mixed The return value of this component. + */ + protected function postExecute($result) + { + $doc = Factory::getDocument(); + + // Debug profiler + if (JDEBUG && $doc->getType() === 'html') + { + $result .= "
" . ProfilerHelper::render('Windwalker', true); + } + + return parent::postExecute($result); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/Config/Config.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/Config/Config.php new file mode 100644 index 00000000..bd9f2476 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/Config/Config.php @@ -0,0 +1,42 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/Listener/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/Listener/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/Listener/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/Mapper/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/Mapper/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/Mapper/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/Mapper/{{controller.item.name.cap}}Mapper.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/Mapper/{{controller.item.name.cap}}Mapper.php new file mode 100644 index 00000000..a760c2bc --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/Mapper/{{controller.item.name.cap}}Mapper.php @@ -0,0 +1,28 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/Provider/{{extension.name.cap}}Provider.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/Provider/{{extension.name.cap}}Provider.php new file mode 100644 index 00000000..85e1513b --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/Provider/{{extension.name.cap}}Provider.php @@ -0,0 +1,33 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/src/{{extension.name.cap}}/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/table/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/table/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/table/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/table/{{controller.item.name.lower}}.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/table/{{controller.item.name.lower}}.php new file mode 100644 index 00000000..d93c47c2 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/table/{{controller.item.name.lower}}.php @@ -0,0 +1,139 @@ +getKeyName(); + + return '{{extension.element.lower}}.{{controller.item.name.lower}}.' . $this->$key; + } + + /** + * Method to return the title to use for the asset table. + * + * In tracking the assets a title is kept for each asset so that there is some context available in a unified access manager. + * Usually this would just return $this->title or $this->name or whatever is being used for the primary name of the row. + * If this method is not overridden, the asset name is used. + * + * @return string The string to use as the title in the asset table. + */ + protected function _getAssetTitle() + { + if (property_exists($this, 'title')) + { + return $this->title; + } + + return $this->_getAssetName(); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/html.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/html.php new file mode 100644 index 00000000..3f52cb91 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/html.php @@ -0,0 +1,89 @@ +engine = new PhpEngine; + + parent::__construct($model, $container, $config, $paths); + } + + /** + * Prepare data hook. + * + * @return void + */ + protected function prepareData() + { + /** @var {{extension.name.cap}}Model{{controller.item.name.cap}} */ + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/tmpl/edit.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/tmpl/edit.php new file mode 100644 index 00000000..000b1610 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/tmpl/edit.php @@ -0,0 +1,75 @@ +getContainer(); +$form = $data->form; +$item = $data->item; + +// Setting tabset +$tabs = array( + 'tab_basic', + 'tab_advanced', + 'tab_params', + 'tab_rules' +); +?> + + + +
+
+ + viewObject); ?> + + 'tab_basic')); ?> + + loadTemplate($tab, array('tab' => $tab)); + } + ?> + + + + +
+ + + +
+
+
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/tmpl/edit_fieldset.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/tmpl/edit_fieldset.php new file mode 100644 index 00000000..a8d1b246 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/tmpl/edit_fieldset.php @@ -0,0 +1,23 @@ +fieldset; +?> +
+ + label ? JText::_($fieldset->label) : JText::_('{{extension.element.upper}}_EDIT_FIELDSET_' . $fieldset->name); ?> + + + form->getFieldset($fieldset->name) as $field): ?> +
+ renderField() . "\n\n"; ?> +
+ +
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/tmpl/edit_tab_advanced.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/tmpl/edit_tab_advanced.php new file mode 100644 index 00000000..9cab68d9 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/tmpl/edit_tab_advanced.php @@ -0,0 +1,23 @@ +tab; +$fieldsets = $data->form->getFieldsets(); +?> + +view->option . '_EDIT_' . strtoupper($tab))) ?> + +
+
+ loadTemplate('fieldset', array('fieldset' => $fieldsets['created'], 'class' => 'form-horizontal')); ?> +
+
+ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/tmpl/edit_tab_basic.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/tmpl/edit_tab_basic.php new file mode 100644 index 00000000..f3f8be5f --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/tmpl/edit_tab_basic.php @@ -0,0 +1,29 @@ +tab; +$fieldsets = $data->form->getFieldsets(); +?> + +view->option . '_EDIT_' . strtoupper($tab))) ?> + +
+
+ loadTemplate('fieldset', array('fieldset' => $fieldsets['information'], 'class' => 'form-horizontal')); ?> + + loadTemplate('fieldset', array('fieldset' => $fieldsets['text'], 'class' => 'form-horizontal')); ?> +
+ +
+ loadTemplate('fieldset', array('fieldset' => $fieldsets['publish'], 'class' => 'form-horizontal')); ?> +
+
+ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/tmpl/edit_tab_params.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/tmpl/edit_tab_params.php new file mode 100644 index 00000000..762718bf --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/tmpl/edit_tab_params.php @@ -0,0 +1,35 @@ +viewObject->tab_name = '{{controller.item.name.lower}}EditTab'; + +// The fieldsets below should be removed. +$data->viewObject->ignore_fieldsets = array( + 'information', + 'publish', + 'text', + 'created', + 'rules', + 'quickadd' +); + +$data->viewObject->ignore_fields = array(); + +$data->viewObject->extra_fields = array(); +?> + +viewObject); diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/tmpl/edit_tab_rules.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/tmpl/edit_tab_rules.php new file mode 100644 index 00000000..3b3f94f6 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/tmpl/edit_tab_rules.php @@ -0,0 +1,23 @@ +tab; +$fieldsets = $data->form->getFieldsets(); +?> + +view->option . '_EDIT_' . strtoupper($tab))) ?> + +
+
+ loadTemplate('fieldset', array('fieldset' => $fieldsets['rules'], 'class' => 'form-horizontal')); ?> +
+
+ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/tmpl/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/tmpl/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.item.name.lower}}/tmpl/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.list.name.lower}}/html.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.list.name.lower}}/html.php new file mode 100644 index 00000000..8f98a4f6 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.list.name.lower}}/html.php @@ -0,0 +1,132 @@ + '{{extension.element.lower}}', + 'view_name' => '{{controller.item.name.lower}}', + 'view_item' => '{{controller.item.name.lower}}', + 'view_list' => '{{controller.list.name.lower}}', + + // Column which we allow to drag sort + 'order_column' => '{{controller.item.name.lower}}.catid, {{controller.item.name.lower}}.ordering', + + // Table id + 'order_table_id' => '{{controller.item.name.lower}}List', + + // Ignore user access, allow all. + 'ignore_access' => false + ); + + // Directly use php engine + $this->engine = new PhpEngine; + + parent::__construct($model, $container, $config, $paths); + } + + /** + * Prepare data hook. + * + * @return void + */ + protected function prepareData() + { + $data = $this->getData(); + + // + } + + /** + * Configure the toolbar button set. + * + * @param array $buttonSet Customize button set. + * @param object $canDo Access object. + * + * @return array + */ + protected function configureToolbar($buttonSet = array(), $canDo = null) + { + // Get default button set. + $buttonSet = parent::configureToolbar($buttonSet, $canDo); + + // In debug mode, we remove trash button but use delete button instead. + // if (JDEBUG) + { + $buttonSet['trash']['access'] = false; + $buttonSet['delete']['access'] = true; + } + + return $buttonSet; + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.list.name.lower}}/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.list.name.lower}}/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.list.name.lower}}/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.list.name.lower}}/tmpl/default.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.list.name.lower}}/tmpl/default.php new file mode 100644 index 00000000..7e829f4f --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.list.name.lower}}/tmpl/default.php @@ -0,0 +1,64 @@ +getContainer(); +?> +
+
+ + data->sidebar)): ?> +
+ data->sidebar; ?> +
+
+ +
+ + + render(array('view' => $this->data)); ?> + + items)): ?> + loadTemplate('table'); ?> + +
+

+ +

+
+ + + render(array('view' => $this->data, 'task_prefix' => '{{controller.list.name.lower}}.')); ?> + + +
+ + + +
+ +
+ +
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.list.name.lower}}/tmpl/default_dropdown.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.list.name.lower}}/tmpl/default_dropdown.php new file mode 100644 index 00000000..4194fb37 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.list.name.lower}}/tmpl/default_dropdown.php @@ -0,0 +1,49 @@ +grid; +$item = $grid->current; + +// Duplicate +Dropdown::duplicate($grid->row, '{{controller.list.name.lower}}.batch'); + +Dropdown::divider(); + +// Published & Unpublished +if ($item->state) +{ + Dropdown::unpublish($grid->row, '{{controller.list.name.lower}}.state'); +} +else +{ + Dropdown::publish($grid->row, '{{controller.list.name.lower}}.state'); +} + +// Trash & Delete +if (JDEBUG || $data->state->get('filter.{{controller.item.name.lower}}.state') == -2) +{ + Dropdown::addCustomItem(\JText::_('JTOOLBAR_DELETE'), 'delete', $grid->row, '{{controller.list.name.lower}}.state.delete'); +} +else +{ + Dropdown::trash($grid->row, '{{controller.list.name.lower}}.state'); +} + +// Render it +echo Dropdown::render(); diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.list.name.lower}}/tmpl/default_table.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.list.name.lower}}/tmpl/default_table.php new file mode 100644 index 00000000..2921cd5c --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.list.name.lower}}/tmpl/default_table.php @@ -0,0 +1,186 @@ +getContainer(); +$asset = $container->get('helper.asset'); +$grid = $data->grid; +$date = $container->get('date'); + +// Set order script. +$grid->registerTableSort(); +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +items as $i => $item) + : + // Prepare data + $item = new Data($item); + + // Prepare item for GridHelper + $grid->setItem($item, $i); + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ orderTitle(); ?> + + + + sortTitle('JSTATUS', '{{controller.item.name.lower}}.state'); ?> + + sortTitle('JGLOBAL_TITLE', '{{controller.item.name.lower}}.title'); ?> + + sortTitle('JCATEGORY', 'category.title'); ?> + + sortTitle('JGRID_HEADING_ACCESS', 'viewlevel.title'); ?> + + sortTitle('JDATE', '{{controller.item.name.lower}}.created'); ?> + + sortTitle('JAUTHOR', 'user.name'); ?> + + sortTitle('JGRID_HEADING_LANGUAGE', 'lang.title'); ?> + + sortTitle('JGRID_HEADING_ID', '{{controller.item.name.lower}}.id'); ?> +
+
+ pagination->getListFooter(); ?> +
+
+ dragSort(); ?> + + id); ?> + +
+ + state() ?> + + + loadTemplate('dropdown'); ?> +
+
+
+ + checkoutButton(); ?> + + + editTitle(); ?> +
+ + +
+ escape($item->alias)); ?> +
+
+ escape($item->category_title); ?> + + escape($item->viewlevel_title); ?> + + created, Text::_('DATE_FORMAT_LC4')); ?> + + escape($item->user_name); ?> + + language(); ?> + + id; ?> +
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.list.name.lower}}/tmpl/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.list.name.lower}}/tmpl/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.list.name.lower}}/tmpl/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.list.name.lower}}/tmpl/modal.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.list.name.lower}}/tmpl/modal.php new file mode 100644 index 00000000..df078857 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/view/{{controller.list.name.lower}}/tmpl/modal.php @@ -0,0 +1,151 @@ +getContainer(); +$input = $container->get('input'); +$grid = $data->grid; +$data->asset = $container->get('helper.asset'); + +$function = $input->get('function', 'jSelectArticle'); +?> + +
+
+ + render(array('view' => $this->data, 'function' => $function)); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + items as $i => $item) + : + + // Prepare data + $item = new Data($item); + + // Prepare item for GridHelper + $grid->setItem($item, $i); + ?> + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/{{extension.name.lower}}.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/{{extension.name.lower}}.php new file mode 100644 index 00000000..6b41f2fd --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/{{extension.name.lower}}.php @@ -0,0 +1,18 @@ +execute(); diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/{{extension.name.lower}}.xml b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/{{extension.name.lower}}.xml new file mode 100644 index 00000000..a058d2bc --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/administrator/{{extension.name.lower}}.xml @@ -0,0 +1,102 @@ + + + {{extension.element.lower}} + 2014-1-11 + Copyright (C) 2016. All rights reserved. + GNU General Public License version 2 or later. + + + example.com + 1.0.0 + {{extension.element.upper}}_XML_DESCRIPTION + + install.php + + + + + + sql/uninstall.sql + + + + + + asset + controller + helper + images + layouts + model + view + component.php + {{extension.name.lower}}.php + index.html + router.php + + + + {{extension.element.upper}} + + + + + asset + controller + etc + helper + helpers + images + language + model + sql + src + table + view + access.xml + component.php + composer.json + config.xml + {{extension.name.lower}}.php + index.html + install.php + + + + + + + + + + + + + + + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/asset/css/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/asset/css/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/asset/css/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/asset/css/main.css b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/asset/css/main.css new file mode 100644 index 00000000..e69b51a8 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/asset/css/main.css @@ -0,0 +1,33 @@ +/*! + * {{extension.element.lower}} + * + * Copyright 2016 {ORGANIZATION} + * License GNU General Public License version 2 or later.. + */ + + +/* GLOBAL */ + + +/* BODY */ + + +/* TYPO */ + + +/* LAYOUT */ + + +/* CONTENT */ + + +/* FILTER */ + + +/* TABLE */ + + +/* FORM */ + + +/* FOOTER */ diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/asset/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/asset/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/asset/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/asset/js/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/asset/js/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/asset/js/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/asset/js/main.js b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/asset/js/main.js new file mode 100644 index 00000000..8683fa30 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/asset/js/main.js @@ -0,0 +1,8 @@ +/** +* @package Joomla.Site +* @subpackage {{extension.element.lower}} +* @copyright Copyright (C) 2016 {ORGANIZATION}. All rights reserved. +* @license GNU General Public License version 2 or later. +*/ + +var {{extension.name.cap}} = {}; \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/component.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/component.php new file mode 100644 index 00000000..efa14f3f --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/component.php @@ -0,0 +1,36 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/controller/{{controller.item.name.lower}}/delegator.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/controller/{{controller.item.name.lower}}/delegator.php new file mode 100644 index 00000000..ebd936a9 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/controller/{{controller.item.name.lower}}/delegator.php @@ -0,0 +1,44 @@ +config['allow_url_params'] = array( + 'type' + ); + + return parent::createController($class); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/controller/{{controller.item.name.lower}}/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/controller/{{controller.item.name.lower}}/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/controller/{{controller.item.name.lower}}/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/controller/{{controller.list.name.lower}}/delegator.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/controller/{{controller.list.name.lower}}/delegator.php new file mode 100644 index 00000000..df851ed4 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/controller/{{controller.list.name.lower}}/delegator.php @@ -0,0 +1,40 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/helper/helper.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/helper/helper.php new file mode 100644 index 00000000..44e2433b --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/helper/helper.php @@ -0,0 +1,18 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/helpers/category.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/helpers/category.php new file mode 100644 index 00000000..4f6a6e89 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/helpers/category.php @@ -0,0 +1,35 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/images/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/images/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/images/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/layouts/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/layouts/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/layouts/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/model/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/model/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/model/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/model/{{controller.item.name.lower}}.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/model/{{controller.item.name.lower}}.php new file mode 100644 index 00000000..e8f98c7d --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/model/{{controller.item.name.lower}}.php @@ -0,0 +1,73 @@ +addTable('{{controller.item.name.lower}}', '#__{{extension.name.lower}}_{{controller.list.name.lower}}') + ->addTable('category', '#__categories', '{{controller.item.name.lower}}.catid = category.id') + ->addTable('user', '#__users', '{{controller.item.name.lower}}.created_by = user.id') + ->addTable('viewlevel', '#__viewlevels', '{{controller.item.name.lower}}.access = viewlevel.id') + ->addTable('lang', '#__languages', '{{controller.item.name.lower}}.language = lang.lang_code'); + } + + /** + * The prepare getQuery hook + * + * @param JDatabaseQuery $query The db query object. + * + * @return void + */ + protected function prepareGetQuery(\JDatabaseQuery $query) + { + parent::prepareGetQuery($query); + } + + /** + * The post getQuery object. + * + * @param JDatabaseQuery $query The db query object. + * + * @return void + */ + protected function postGetQuery(\JDatabaseQuery $query) + { + } + + /** + * Method to auto-populate the model state. + * + * This method will only called in constructor. Using `ignore_request` to ignore this method. + * + * @param string $ordering An optional ordering field. + * @param string $direction An optional direction (asc|desc). + * + * @return void + */ + protected function populateState($ordering = null, $direction = null) + { + $params = $this->getParams(); + $user = $this->container->get('user'); + $input = $this->container->get('input'); + $app = $this->container->get('app'); + + // Max Category Level + // ===================================================================================== + $maxLevel = $params->get('maxLevel'); + + if ($maxLevel) + { + $this->set('filter.max_category_levels', $maxLevel); + } + + // Has Edit Access + // ===================================================================================== + if (($user->authorise('core.edit.state', '{{extension.element.lower}}')) || ($user->authorise('core.edit', '{{extension.element.lower}}'))) + { + // Filter on published for those who do not have edit or edit.state rights. + $this->set('filter.show_unpublished', 1); + } + + // View Level + // ===================================================================================== + if (!$params->get('show_noauth')) + { + $this->set('filter.access', true); + } + else + { + $this->set('filter.access', false); + } + + // Language + // ===================================================================================== + if ($app instanceof SiteApplication) + { + $this->set('filter.language', $app->getLanguageFilter()); + } + + parent::populateState($ordering, 'ASC'); + + // Order + // ===================================================================================== + $orderCol = $params->get('orderby', '{{controller.item.name.lower}}.ordering'); + $this->set('list.ordering', $orderCol); + + // Order Dir + // ===================================================================================== + $listOrder = $params->get('order_dir', 'ASC'); + $this->set('list.direction', $listOrder); + + // Limitstart + // ===================================================================================== + + // Simple fix for current Joomla + // @see https://github.com/ventoviro/windwalker-joomla-rad/issues/203 + $this->set('list.start', $input->getInt('start', $input->getInt('limitstart', 0))); + $this->set( + 'list.limit', + $params->get('num_leading_items', 1) + + $params->get('num_intro_items', 4) + ); + } + + /** + * Process the query filters. + * + * @param JDatabaseQuery $query The query object. + * @param array $filters The filters values. + * + * @return JDatabaseQuery The db query object. + * + * @throws Exception + */ + protected function processFilters(\JDatabaseQuery $query, $filters = array()) + { + $user = $this->container->get('user'); + $db = $this->container->get('db'); + $date = $this->container->get('date'); + + // If no state filter, set published >= 0 + if (!isset($filters['{{controller.item.name.lower}}.state']) && property_exists($this->getTable(), 'state')) + { + $query->where($query->quoteName('{{controller.item.name.lower}}.state') . ' >= 0'); + } + + // Category + // ===================================================================================== + $category = $this->getCategory(); + + if ($category->id != 1 && $this->filterField('category.lft') && $this->filterField('category.rgt')) + { + $query->where($query->format('(%n >= %a AND %n <= %a)', 'category.lft', $category->lft, 'category.rgt', $category->rgt)); + } + + // Max Category Level + // ===================================================================================== + $maxLevel = $this->state->get('filter.max_category_levels', -1); + + if ($maxLevel > 0) + { + $query->where($query->quoteName('category.level') . " <= " . $maxLevel); + } + + // Has Edit Access + // ===================================================================================== + if ($this->state->get('filter.show_unpublished')) + { + $query->where('{{controller.item.name.lower}}.state >= 0'); + } + else + { + $query->where('{{controller.item.name.lower}}.state > 0'); + + $nullDate = $query->Quote($db->getNullDate()); + $nowDate = $query->Quote($date->toSQL(true)); + + if ($this->filterField('{{controller.item.name.lower}}.publish_up') && $this->filterField('{{controller.item.name.lower}}.publish_down')) + { + $query->where('({{controller.item.name.lower}}.publish_up = ' . $nullDate . ' OR {{controller.item.name.lower}}.publish_up <= ' . $nowDate . ')'); + $query->where('({{controller.item.name.lower}}.publish_down = ' . $nullDate . ' OR {{controller.item.name.lower}}.publish_down >= ' . $nowDate . ')'); + } + } + + unset($filters['show_unpublished']); + + // View Level + // ===================================================================================== + if ($this->state->get('filter.access') && $this->filterField('{{controller.item.name.lower}}.access')) + { + $query->where('{{controller.item.name.lower}}.access ' . new JDatabaseQueryElement('IN()', $user->getAuthorisedViewLevels())); + } + + // Language + // ===================================================================================== + if ($this->state->get('filter.language') && $this->filterField('{{controller.item.name.lower}}.language')) + { + $lang_code = $db->quote(Factory::getLanguage()->getTag()); + $query->where("{{controller.item.name.lower}}.language IN ('{$lang_code}', '*')"); + } + + return parent::processFilters($query, $filters); + } + + /** + * Configure the filter handlers. + * + * Example: + * ``` php + * $filterHelper->setHandler( + * '{{controller.item.name.lower}}.date', + * function($query, $field, $value) + * { + * $query->where($field . ' >= ' . $value); + * } + * ); + * ``` + * + * @param FilterHelper $filterHelper The filter helper object. + * + * @return void + */ + protected function configureFilters($filterHelper) + { + } + + /** + * Configure the search handlers. + * + * Example: + * ``` php + * $searchHelper->setHandler( + * '{{controller.item.name.lower}}.title', + * function($query, $field, $value) + * { + * return $query->quoteName($field) . ' LIKE ' . $query->quote('%' . $value . '%'); + * } + * ); + * ``` + * + * @param SearchHelper $searchHelper The search helper object. + * + * @return void + */ + protected function configureSearches($searchHelper) + { + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/router.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/router.php new file mode 100644 index 00000000..9dcf2f00 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/router.php @@ -0,0 +1,46 @@ +attachRule(new MenuRules($this)); + $this->attachRule(new StandardRules($this)); + $this->attachRule(new NomenuRules($this)); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/router/handler/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/router/handler/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/router/handler/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/router/handler/{{controller.item.name.lower}}.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/router/handler/{{controller.item.name.lower}}.php new file mode 100644 index 00000000..2790652e --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/router/handler/{{controller.item.name.lower}}.php @@ -0,0 +1,54 @@ +setKey('id') + ->setParent($this->router->getView('{{controller.list.name.lower}}'), 'catid') + ->addLayout('default'); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/router/handler/{{controller.list.name.lower}}.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/router/handler/{{controller.list.name.lower}}.php new file mode 100644 index 00000000..12b3746b --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/router/handler/{{controller.list.name.lower}}.php @@ -0,0 +1,47 @@ +setKey('id') + ->setNestable() + ->addLayout('default'); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/router/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/router/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/router/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.item.name.lower}}/html.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.item.name.lower}}/html.php new file mode 100644 index 00000000..62ef4f0c --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.item.name.lower}}/html.php @@ -0,0 +1,194 @@ +get('Category'); + $this['params'] = $this->get('Params'); + + // Prepare setting data + $item = $this['item'] = new Data($this['item']); + $state = $this['state']; + + // Link + // ===================================================================================== + $item->link = Route::view('{{controller.item.name.lower}}', array( + 'id' => $item->id . ':' . $item->alias, + 'catid' => $item->catid + )); + + // Dsplay Data + // ===================================================================================== + $item->user_name = with(new DataMapper('#__users'))->findOne($item->created_by)->name; + $item->cat_title = !empty($this->category) ? $this->category->title : null; + + $item->text = $item->introtext . $item->fulltext; + + // View Level + // ===================================================================================== + FrontViewHelper::viewLevel($item, $this['category'], $state, $this['params']); + + // Publish Date + // ===================================================================================== + FrontViewHelper::checkPublishedDate($item); + + // Plugins + // ===================================================================================== + FrontViewHelper::events($item, $this['params'], $this->context); + + $this->configureParams($item); + } + + /** + * Configure the config data. + * + * @param Data $item The item object + * + * @return void + */ + protected function configureParams($item) + { + $app = $this->container->get('app'); + $data = $this->getData(); + + // Params + // ===================================================================================== + + // Merge {{controller.item.name.lower}} params. If this is single-{{controller.item.name.lower}} view, menu params override article params + // Otherwise, {{controller.item.name.lower}} params override menu item params + $active = $app->getMenu()->getActive(); + $temp = clone $data->params; + $item->params = new Registry($item->params); + + // Check to see which parameters should take priority + if ($active) + { + $currentLink = $active->link; + + // If the current view is the active item and an {{controller.item.name.lower}} view for this {{controller.item.name.lower}}, + // then the menu item params take priority + if (strpos($currentLink, 'view={{controller.item.name.lower}}') && strpos($currentLink, '&id=' . $item->id)) + { + // $item->params are the {{controller.item.name.lower}} params, $temp are the menu item params + // Merge so that the menu item params take priority + $item->params->merge($temp); + + // Load layout from active query (in case it is an alternative menu item) + if (isset($active->query['layout'])) + { + $this->setLayout($active->query['layout']); + } + // Check for alternative layout of article + elseif ($layout = $item->params->get('layout_type')) + { + $this->setLayout($layout); + } + } + else + { + // Check for alternative layouts (since we are not in a single-{{controller.item.name.lower}} menu item) + // Single-{{controller.item.name.lower}} menu item layout takes priority over alt layout for an {{controller.item.name.lower}} + // Make sure set layout first since there may no layout params in item + if ($layout = $item->params->get('layout_type')) + { + $this->setLayout($layout); + } + + // Current view is not a single {{controller.item.name.lower}}, so the {{controller.item.name.lower}} params take priority here + // Merge the menu item params with the {{controller.item.name.lower}} params so that the {{controller.item.name.lower}} params take priority + $temp->merge($item->params); + $item->params = $temp; + + // If not Active, set Title + $this->setTitle($item->get('title')); + } + } + else + { + // Merge so that article params take priority + $temp->merge($data->params); + $data->params = $temp; + + // Check for alternative layouts (since we are not in a single-article menu item) + // Single-article menu item layout takes priority over alt layout for an article + if ($layout = $item->params->get('layout_type')) + { + $this->setLayout($layout); + } + + // If not Active, set Title + $this->setTitle($item->get('title')); + } + + $item->params = $data->params; + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.item.name.lower}}/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.item.name.lower}}/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.item.name.lower}}/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.item.name.lower}}/tmpl/default.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.item.name.lower}}/tmpl/default.php new file mode 100644 index 00000000..e007880b --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.item.name.lower}}/tmpl/default.php @@ -0,0 +1,117 @@ +getContainer(); +$params = $data->item->params; +$item = $data->item; +?> + +
+ +
+
+ +
+
+ + + +
+

get('link_titles', 1) ? HTMLHelper::_('link', $item->link, $this->escape($item->title)) : $this->escape($item->title); ?>

+
+ + + + + + item->event->afterDisplayTitle; ?> + + + + + +
+
+ category->title, JRoute::_('index.php?option={{extension.element.lower}}&view={{controller.list.name.lower}}&id=' . $item->catid), 'folder'); ?> + created); ?> + modified); ?> + user_name, 'user'); ?> +
+
+ +
+ + + + + + item->event->beforeDisplayContent; ?> + + + + + +
+
+ +
+ images)): ?> +
+ escape($item->images), $this->escape($item->title)); ?> +
+ + + + +
+ text; ?> +
+ + +
+ +
+
+ + + + + + item->event->afterDisplayContent; ?> + + + +
+
+ +
+
+ +
+ + + + +
+
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.item.name.lower}}/tmpl/default.xml b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.item.name.lower}}/tmpl/default.xml new file mode 100644 index 00000000..18fb1fd8 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.item.name.lower}}/tmpl/default.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + +
+ + +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.item.name.lower}}/tmpl/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.item.name.lower}}/tmpl/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.item.name.lower}}/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.list.name.lower}}/html.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.list.name.lower}}/html.php new file mode 100644 index 00000000..84e45e43 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.list.name.lower}}/html.php @@ -0,0 +1,130 @@ +get('Params'); + $this['category'] = $this->get('Category'); + + // Uncomment this to fix Joomla pagination routing + // $this['pagination']->setAdditionalUrlParam('_resource', '{{controller.list.name.lower}}'); + + // Set Data + // ===================================================================================== + foreach ($this->data->items as &$item) + { + $item = new Data($item); + $item->params = new JRegistry($item->params); + + $item->text = $item->introtext; + + // Link + // ===================================================================================== + $item->link = Route::view('{{controller.item.name.lower}}', array( + 'id' => $item->id . ':' . $item->alias, + 'catid' => $item->catid + )); + + // Publish Date + // ===================================================================================== + FrontViewHelper::checkPublishedDate($item); + + // Plugins + // ===================================================================================== + FrontViewHelper::events($item, $this['params'], $this->context); + } + + // Set title + // ===================================================================================== + $this->configureTitle(); + } + + /** + * configureTitle + * + * @return void + */ + public function configureTitle() + { + $app = $this->container->get('app'); + $active = $app->getMenu()->getActive(); + + if ($active) + { + $currentLink = $active->link; + + if (!strpos($currentLink, 'view={{controller.list.name.lower}}') || !(strpos($currentLink, 'id=' . (string) $this['category']->id))) + { + // If not Active, set Title + $this->setTitle($this['category']->title); + } + + // Otherwise use Menu title. + } + else + { + $this->setTitle($this['category']->title); + } + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.list.name.lower}}/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.list.name.lower}}/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.list.name.lower}}/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.list.name.lower}}/tmpl/default.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.list.name.lower}}/tmpl/default.php new file mode 100644 index 00000000..66354914 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.list.name.lower}}/tmpl/default.php @@ -0,0 +1,77 @@ +getContainer(); +$data = $this->data; +$state = $data->state; +$user = $container->get('user'); +?> +
+ +
+
+ + + render($data->dump()); ?> + + + + render($data->dump()); ?> + + + +
+ + + items)): ?> + + items as $key => &$item): ?> +
+ loadTemplate('item', array('item' => $item)); ?> +
+ + + + + + + + + + render($data->dump()); ?> + +
+
+ + +
+ + + +
+
+ +
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.list.name.lower}}/tmpl/default.xml b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.list.name.lower}}/tmpl/default.xml new file mode 100644 index 00000000..11265d21 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.list.name.lower}}/tmpl/default.xml @@ -0,0 +1,284 @@ + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + +
+
+
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.list.name.lower}}/tmpl/default_item.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.list.name.lower}}/tmpl/default_item.php new file mode 100644 index 00000000..a52b7dd6 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.list.name.lower}}/tmpl/default_item.php @@ -0,0 +1,119 @@ +getContainer(); +$data = $this->data; +$state = $data->state; +$user = $container->get('user'); +$params = $data->params; +$item = $data->item; + +$anchor_id = '{{controller.item.name.lower}}-item-' . $item->id; +?> +
+
+ + + +
+

+ get('link_titles_in_list', 1) ? HTMLHelper::_('link', $item->link, $item->title) : $item->title ?> +

+
+ + + + + + item->event->afterDisplayTitle; ?> + + + + + +
+
+ category_title, Route::view('{{controller.list.name.lower}}', array('id' => $item->catid)), 'folder'); ?> + created); ?> + modified); ?> + user_name, 'user'); ?> +
+
+ + + +
+ + + + item->event->beforeDisplayContent; ?> + + + + + +
+
+ + images)): ?> +
+ escape($item->images), $this->escape($item->title)); ?> +
+ + + + +
+ text; ?> +
+ + +
+
+ + + + + +
+
+

+

+ + + +

+
+
+ + + + + + item->event->afterDisplayContent; ?> + + + +
+
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.list.name.lower}}/tmpl/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.list.name.lower}}/tmpl/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/view/{{controller.list.name.lower}}/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/{{extension.name.lower}}.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/{{extension.name.lower}}.php new file mode 100644 index 00000000..6b41f2fd --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/default/site/{{extension.name.lower}}.php @@ -0,0 +1,18 @@ +execute(); diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/access.xml b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/access.xml new file mode 100644 index 00000000..8a3dbca5 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/access.xml @@ -0,0 +1,26 @@ + + +
+ + + + + + + + + +
+
+ + + + + +
+
+ + + +
+
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/asset/css/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/asset/css/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/asset/css/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/asset/css/main.css b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/asset/css/main.css new file mode 100644 index 00000000..f8a2ff6f --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/asset/css/main.css @@ -0,0 +1,33 @@ +/*! + * {{extension.element.lower}} + * + * Copyright 2016 {ORGANIZATION} + * License GNU General Public License version 2 or later. + */ + +/* GLOBAL */ + + +/* BODY */ + + +/* TYPO */ + + +/* LAYOUT */ + + +/* CONTENT */ + + +/* FILTER */ + + +/* TABLE */ + + +/* FORM */ + + +/* FOOTER */ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/asset/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/asset/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/asset/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/asset/js/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/asset/js/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/asset/js/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/asset/js/main.js b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/asset/js/main.js new file mode 100644 index 00000000..0ac64fbc --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/asset/js/main.js @@ -0,0 +1,8 @@ +/** + * @package Joomla.Administrator + * @subpackage {{extension.element.lower}} + * @copyright Copyright (C) 2016 {ORGANIZATION}. All rights reserved. + * @license GNU General Public License version 2 or later. + */ + +var {{extension.name.cap}} = {}; diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/component.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/component.php new file mode 100644 index 00000000..efa14f3f --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/component.php @@ -0,0 +1,36 @@ + + +
+ +
+
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/controller/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/controller/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/controller/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/controller/{{controller.item.name.lower}}/delegator.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/controller/{{controller.item.name.lower}}/delegator.php new file mode 100644 index 00000000..ebd936a9 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/controller/{{controller.item.name.lower}}/delegator.php @@ -0,0 +1,44 @@ +config['allow_url_params'] = array( + 'type' + ); + + return parent::createController($class); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/controller/{{controller.item.name.lower}}/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/controller/{{controller.item.name.lower}}/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/controller/{{controller.item.name.lower}}/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/controller/{{controller.list.name.lower}}/delegator.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/controller/{{controller.list.name.lower}}/delegator.php new file mode 100644 index 00000000..df851ed4 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/controller/{{controller.list.name.lower}}/delegator.php @@ -0,0 +1,40 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/etc/config.dist.yml b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/etc/config.dist.yml new file mode 100644 index 00000000..657071c9 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/etc/config.dist.yml @@ -0,0 +1,3 @@ +systyem: + debug: true + develement: true diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/etc/config.json b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/etc/config.json new file mode 100644 index 00000000..f09ade0b --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/etc/config.json @@ -0,0 +1,6 @@ +{ + "system" : { + "debug" : true, + "development" : true + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/etc/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/etc/index.html new file mode 100644 index 00000000..42682b47 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/etc/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/helper/helper.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/helper/helper.php new file mode 100644 index 00000000..e8b0b2cf --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/helper/helper.php @@ -0,0 +1,201 @@ +isClient('administrator')) + { + JHtmlSidebar::addEntry( + JText::_('JCATEGORY'), + 'index.php?option=com_categories&extension={{extension.element.lower}}', + $vName === 'categories' + ); + } + + foreach (new \DirectoryIterator(JPATH_ADMINISTRATOR . '/components/{{extension.element.lower}}/view') as $folder) + { + if ($folder->isDir() && $inflector->isPlural($view = $folder->getBasename())) + { + JHtmlSidebar::addEntry( + JText::sprintf(sprintf('{{extension.element.upper}}_%s_TITLE_LIST', strtoupper($folder))), + 'index.php?option={{extension.element.lower}}&view=' . $view, + $vName === $view + ); + } + } + + $dispatcher = \JEventDispatcher::getInstance(); + $dispatcher->trigger('onAfterAddSubmenu', array('{{extension.element.lower}}', $vName)); + } + + /** + * Adds Count Items for Category Manager. + * + * @param stdClass[] &$items The banner category objects + * + * @return stdClass[] + * + * @throws \RuntimeException + * + * @since 1.0 + */ + public static function countItems(&$items) + { + $db = JFactory::getDbo(); + + foreach ($items as $item) + { + $item->count_trashed = 0; + $item->count_archived = 0; + $item->count_unpublished = 0; + $item->count_published = 0; + + $query = $db->getQuery(true); + + $query->select('state, count(*) AS count') + ->from($query->quoteName('#__{{extension.name.lower}}_{{controller.list.name.lower}}')) + ->where('catid = ' . (int) $item->id) + ->group('state'); + + $db->setQuery($query); + + $elements = (array) $db->loadObjectList(); + + foreach ($elements as $element) + { + switch ($element->state) { + case 0: + $item->count_unpublished = $element->count; + break; + + case 1: + $item->count_published = $element->count; + break; + + case 2: + $item->count_archived = $element->count; + break; + + case -2: + $item->count_trashed = $element->count; + break; + } + } + } + + return $items; + } + + /** + * Gets a list of the actions that can be performed. + * + * @param string $option Action option. + * + * @return JObject + */ + public static function getActions($option = '{{extension.element.lower}}') + { + $user = JFactory::getUser(); + $result = new \JObject; + + $actions = array( + 'core.admin', + 'core.options', + 'core.manage', + 'core.create', + 'core.delete', + 'core.edit', + 'core.edit.state', + 'core.edit.own', + 'core.edit.value', + ); + + foreach ($actions as $action) + { + $result->set($action, $user->authorise($action, $option)); + } + + return $result; + } + + /** + * Returns a valid section for articles. If it is not valid then null + * is returned. + * + * @param string $section The section to get the mapping for + * + * @return string|null The new section + * + * @since 1.0 + */ + public static function validateSection($section) + { + if (JFactory::getApplication()->isClient('site')) + { + // On the front end we need to map some sections + switch ($section) + { + // Map to {{controller.item.name.lower}} + case '{{controller.item.name.lower}}': + case '{{controller.list.name.lower}}': + $section = '{{controller.item.name.lower}}'; + break; + + default: + $section = null; + } + } + + return $section; + } + + /** + * Returns valid contexts + * + * @return array + * + * @since 1.0 + */ + public static function getContexts() + { + JFactory::getLanguage()->load('com_content', JPATH_ADMINISTRATOR); + + $contexts = array( + '{{extension.element.lower}}.{{controller.item.name.lower}}' => JText::_('{{extension.element.upper}}_VIEW_{{controller.item.name.upper}}'), + '{{extension.element.lower}}.categories' => JText::_('JCATEGORY'), + + // Add more group here... + ); + + return $contexts; + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/helper/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/helper/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/helper/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/helpers/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/helpers/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/helpers/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/helpers/{{extension.name.lower}}.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/helpers/{{extension.name.lower}}.php new file mode 100644 index 00000000..b1bc9f7c --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/helpers/{{extension.name.lower}}.php @@ -0,0 +1,11 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/images/{{extension.element.lower}}_logo.png b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/images/{{extension.element.lower}}_logo.png new file mode 100644 index 00000000..fb6ae69b Binary files /dev/null and b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/images/{{extension.element.lower}}_logo.png differ diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/index.html new file mode 100644 index 00000000..42682b47 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/install.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/install.php new file mode 100644 index 00000000..fe2be7a6 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/install.php @@ -0,0 +1,107 @@ +getParent(); + $installer = new JInstaller; + $manifest = $p_installer->manifest; + $path = $p_installer->getPath('source'); + $result = array(); + + $css = << +#ak-install-img +{ +} + +#ak-install-msg +{ +} + +CSS; + + echo $css; + + $installScript = dirname($path) . '/windwalker/src/System/installscript.php'; + + if (!is_file($installScript)) + { + $installScript = JPATH_LIBRARIES . '/windwalker/src/System/installscript.php'; + } + + include $installScript; + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/en-GB/en-GB.{{extension.element.lower}}.ini b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/en-GB/en-GB.{{extension.element.lower}}.ini new file mode 100644 index 00000000..af721b47 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/en-GB/en-GB.{{extension.element.lower}}.ini @@ -0,0 +1,113 @@ +; {ORGANIZATION} Extension +; Copyright (C) 2012 {ORGANIZATION}. All rights reserved. +; License GNU General Public License version 2 or later., see LICENSE.php +; Note : All ini files need to be saved as UTF-8 - No BOM + +; Main information +{{extension.element.upper}}="{{extension.name.cap}}" +{{extension.element.upper}}_CONFIGURATION="{{extension.name.cap}} Configuration" +{{extension.element.upper}}_COMPONENT_LABEL="Basic" +{{extension.element.upper}}_COMPONENT_DESC="Basic Component config." +{{extension.element.upper}}_ACCESS_HEADING="Access" + + +; Config inputs +{{extension.element.upper}}_CHANGE_ITEM="Change item." +{{extension.element.upper}}_CHANGE_ITEM_BUTTON="Change item." +{{extension.element.upper}}_SELECT_ITEM="Select item." + +{{extension.element.upper}}_FIELDSET_RULES="Rules" +{{extension.element.upper}}_LINKED_TITLES_IN_LIST="Linked title in list" +{{extension.element.upper}}_LINKED_TITLES_IN_LIST_DESC="Linked title in list" +{{extension.element.upper}}_MODIFIED="Modified" +{{extension.element.upper}}_ORDER_DIR="Order Dir" +{{extension.element.upper}}_ORDER_DIR_ASC="Asc" +{{extension.element.upper}}_ORDER_DIR_DESC="Desc" +{{extension.element.upper}}_READMORE="Readmore" +{{extension.element.upper}}_CREATED="Created" +{{extension.element.upper}}_PUBLISHED_DOWN="Finish Publishing" +{{extension.element.upper}}_PUBLISH_DOWN_DESC="Finish Publishing Time." +{{extension.element.upper}}_PUBLISH_UP="Start Publishing" +{{extension.element.upper}}_PUBLISH_UP_DESC="Start publishing time." + +COM_CONFIG_ITEM_FIELDSET_LABEL="Item Config" +COM_CONFIG_CATEGORY_FIELDSET_LABEL="Category Config" +{{extension.element.upper}}_ITEM_SETTINGS="Item Setting" +JFIELD_ALT_LAYOUT="View Layout" + +{{extension.element.upper}}_PARENT_ITEM="Parent Item" +{{extension.element.upper}}_PARENT_ITEM_DESC="Select parent item." +{{extension.element.upper}}_TITLE_UNCATEGORISED="Uncategorised" + +; ----------------- + + +; Message +{{extension.element.upper}}_N_ITEMS_ARCHIVED="%d items successfully archived" +{{extension.element.upper}}_N_ITEMS_ARCHIVED_1="%d item successfully archived" +{{extension.element.upper}}_N_ITEMS_CHECKED_IN_0="No item successfully checked in" +{{extension.element.upper}}_N_ITEMS_CHECKED_IN_1="%d item successfully checked in" +{{extension.element.upper}}_N_ITEMS_CHECKED_IN_MORE="%d items successfully checked in" +{{extension.element.upper}}_N_ITEMS_DELETED="%d items successfully deleted" +{{extension.element.upper}}_N_ITEMS_DELETED_1="%d item successfully deleted" +{{extension.element.upper}}_N_ITEMS_PUBLISHED="%d items successfully published" +{{extension.element.upper}}_N_ITEMS_PUBLISHED_1="%d item successfully published" +{{extension.element.upper}}_N_ITEMS_TRASHED="%d items successfully trashed" +{{extension.element.upper}}_N_ITEMS_TRASHED_1="%d item successfully trashed" +{{extension.element.upper}}_N_ITEMS_UNPUBLISHED="%d items successfully unpublished" +{{extension.element.upper}}_N_ITEMS_UNPUBLISHED_1="%d item successfully unpublished" +{{extension.element.upper}}_NO_ITEM_SELECTED="No items selected" +{{extension.element.upper}}_SAVE_SUCCESS="Item successfully saved" +{{extension.element.upper}}_REBUILD_SUCCESS="Rebuild success." +{{extension.element.upper}}_REBUILD_FAILURE="Rebuild failure." + + +; List interface +{{extension.element.upper}}_TITLE_LIST="List" +{{extension.element.upper}}_TITLE_ITEM_EDIT="Edit" +{{extension.element.upper}}_REBUILD="Rebuild" +{{extension.element.upper}}_BATCH_OPTIONS="Batch Options" +{{extension.element.upper}}_BATCH_TIP="If choosing to copy an item, any other actions selected will be applied to the copied item. Otherwise, all actions are applied to the selected item." + + +; Edit interface +{{extension.element.upper}}_EDIT_FIELDS_ADVANCED="Advanced" +{{extension.element.upper}}_EDIT_FIELDS_BASIC="Basic" +{{extension.element.upper}}_EDIT_FIELDS_RULES="Access" +{{extension.element.upper}}_EDIT_FIELDSET_CREATED="Created" +{{extension.element.upper}}_EDIT_FIELDSET_INFORMATION="Information" +{{extension.element.upper}}_EDIT_FIELDSET_PUBLISH="Publishing" +{{extension.element.upper}}_EDIT_FIELDSET_RULES="Access Rules" +{{extension.element.upper}}_EDIT_FIELDSET_TEXT="Text" + +{{extension.element.upper}}_CREATED_BY="Author" +{{extension.element.upper}}_CREATED_BY_DESC="Author" +{{extension.element.upper}}_CREATED_DESC="Select created time." +{{extension.element.upper}}_FULLTEXT="Content" +{{extension.element.upper}}_FULLTEXT_DESC="Type your content here." +{{extension.element.upper}}_IMAGES="Image" +{{extension.element.upper}}_IMAGES_DESC="Press here to upload images." +{{extension.element.upper}}_INTROTEXT="Introduction" +{{extension.element.upper}}_INTROTEXT_DESC="Type youre intro here." +{{extension.element.upper}}_URL="URL" +{{extension.element.upper}}_URL_DESC="Enter url here." + +; View list +{{extension.element.upper}}_MORE_LINKS="More links" + +; Modal +{{extension.element.upper}}_MODAL_NO_SELECT="- No Select -" + +; 2.0 +{{extension.element.upper}}_EDIT_TAB_ADVANCED="Advanced" +{{extension.element.upper}}_EDIT_TAB_BASIC="Basic" +{{extension.element.upper}}_EDIT_TAB_RULES="Access" + +; {{controller.item.name.cap}} +{{extension.element.upper}}_VIEW_{{controller.item.name.upper}}="{{controller.item.name.cap}}" +{{extension.element.upper}}_VIEW_{{controller.list.name.upper}}="{{controller.list.name.cap}}" +{{extension.element.upper}}_SELECT_{{controller.item.name.upper}}="Select {{controller.item.name.cap}}" +{{extension.element.upper}}_SELECT_{{controller.item.name.upper}}_DESC="Select {{controller.item.name.cap}}" +{{extension.element.upper}}_{{controller.list.name.upper}}_VIEW_DEFAULT_OPTION="Default" +{{extension.element.upper}}_{{controller.list.name.upper}}_TITLE_LIST="{{controller.item.name.cap}} List" +{{extension.element.upper}}_{{controller.item.name.upper}}_TITLE_ITEM_EDIT="{{controller.item.name.cap}} Item Edit" diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/en-GB/en-GB.{{extension.element.lower}}.sys.ini b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/en-GB/en-GB.{{extension.element.lower}}.sys.ini new file mode 100644 index 00000000..8537bb0f --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/en-GB/en-GB.{{extension.element.lower}}.sys.ini @@ -0,0 +1,18 @@ +; {ORGANIZATION} Extension +; Copyright (C) 2012 {ORGANIZATION}. All rights reserved. +; License GNU General Public License version 2 or later., see LICENSE.php +; Note : All ini files need to be saved as UTF-8 - No BOM + +{{extension.element.upper}}="{{extension.name.cap}}" +{{extension.name.upper}}="{{extension.name.cap}}" +{{extension.element.upper}}_XML_DESCRIPTION="" +{{extension.element.upper}}_INSTALL_MSG="{{extension.name.cap}} Component" + +; Version 3.0 +{{extension.element.upper}}_LIST_VIEW_DESC="List items." +{{extension.element.upper}}_ITEM_VIEW_DEFAULT_DESC="Show single item." + +; {{controller.item.name.cap}} +{{extension.element.upper}}_{{controller.list.name.upper}}="{{controller.list.name.cap}}" +{{extension.element.upper}}_{{controller.item.name.upper}}_VIEW_DEFAULT_TITLE="{{controller.item.name.cap}} Item" +{{extension.element.upper}}_{{controller.list.name.upper}}_VIEW_DEFAULT_TITLE="{{controller.list.name.cap}} List" diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/en-GB/en-GB.{{extension.element.lower}}.{{controller.item.name.lower}}.ini b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/en-GB/en-GB.{{extension.element.lower}}.{{controller.item.name.lower}}.ini new file mode 100644 index 00000000..06e121a1 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/en-GB/en-GB.{{extension.element.lower}}.{{controller.item.name.lower}}.ini @@ -0,0 +1,5 @@ +; {ORGANIZATION} Extension +; Copyright (C) 2012 {ORGANIZATION}. All rights reserved. +; License GNU General Public License version 2 or later., see LICENSE.php +; Note : All ini files need to be saved as UTF-8 - No BOM + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/en-GB/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/en-GB/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/en-GB/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/zh-TW/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/zh-TW/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/zh-TW/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/zh-TW/zh-TW.{{extension.element.lower}}.ini b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/zh-TW/zh-TW.{{extension.element.lower}}.ini new file mode 100644 index 00000000..692d9ede --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/zh-TW/zh-TW.{{extension.element.lower}}.ini @@ -0,0 +1,58 @@ +; {ORGANIZATION} Extension +; Copyright (C) 2012 {ORGANIZATION}. All rights reserved. +; License GNU General Public License version 2 or later., see LICENSE.php +; Note : All ini files need to be saved as UTF-8 - No BOM + +; Main information +{{extension.element.upper}}="{{extension.name.cap}} 元件" +{{extension.element.upper}}_CONFIGURATION="{{extension.name.cap}} 元件設定" +{{extension.element.upper}}_COMPONENT_LABEL="基礎設定" +{{extension.element.upper}}_COMPONENT_DESC="這裡是基礎設定" +{{extension.element.upper}}_ACCESS_HEADING="Access" +{{extension.element.upper}}_TITLE_LIST="列表管理" + + +; Config inputs +{{extension.element.upper}}_CHANGE_ITEM="更換項目" +{{extension.element.upper}}_CHANGE_ITEM_BUTTON="按此更改項目" +{{extension.element.upper}}_SELECT_ITEM="選擇項目" + +{{extension.element.upper}}_FIELDSET_RULES="項目權限設定" +{{extension.element.upper}}_LINKED_TITLES_IN_LIST="分類頁面項目標題超連結" +{{extension.element.upper}}_LINKED_TITLES_IN_LIST_DESC="項目標題超連結" +{{extension.element.upper}}_MODIFIED="最後更新" +{{extension.element.upper}}_ORDER_DIR="正反序" +{{extension.element.upper}}_ORDER_DIR_ASC="正序" +{{extension.element.upper}}_ORDER_DIR_DESC="反序" +{{extension.element.upper}}_READMORE="閱讀更多" +{{extension.element.upper}}_CREATED="建立時間" +{{extension.element.upper}}_PUBLISHED_DOWN="停止發佈時間" +{{extension.element.upper}}_PUBLISH_DOWN_DESC="停止發佈時間" +{{extension.element.upper}}_PUBLISH_UP="開始發佈時間" +{{extension.element.upper}}_PUBLISH_UP_DESC="開始發佈時間" + +COM_CONFIG_ITEM_FIELDSET_LABEL="項目顯示設定" +COM_CONFIG_CATEGORY_FIELDSET_LABEL="分類顯示設定" +{{extension.element.upper}}_ITEM_SETTINGS="項目設定" +JFIELD_ALT_LAYOUT="View 版面" + +{{extension.element.upper}}_PARENT_ITEM="上層項目" +{{extension.element.upper}}_PARENT_ITEM_DESC="選擇上層項目" +{{extension.element.upper}}_TITLE_UNCATEGORISED="未分類" + +; Modal +{{extension.element.upper}}_MODAL_NO_SELECT="- 不選擇 -" + +; 2.0 +{{extension.element.upper}}_EDIT_TAB_ADVANCED="進階" +{{extension.element.upper}}_EDIT_TAB_BASIC="一般" +{{extension.element.upper}}_EDIT_TAB_RULES="權限" + +; {{controller.item.name.cap}} +{{extension.element.upper}}_VIEW_{{controller.item.name.upper}}="{{controller.item.name.cap}}" +{{extension.element.upper}}_VIEW_{{controller.list.name.upper}}="{{controller.list.name.cap}}" +{{extension.element.upper}}_SELECT_{{controller.item.name.upper}}="選擇 {{controller.item.name.cap}}" +{{extension.element.upper}}_SELECT_{{controller.item.name.upper}}_DESC="按這裡即可選擇 {{controller.item.name.cap}}" +{{extension.element.upper}}_{{controller.list.name.upper}}_VIEW_DEFAULT_OPTION="預設" +{{extension.element.upper}}_{{controller.list.name.upper}}_TITLE_LIST="{{controller.item.name.cap}} 列表管理" +{{extension.element.upper}}_{{controller.item.name.upper}}_TITLE_ITEM_EDIT="{{controller.item.name.cap}} 項目編輯" \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/zh-TW/zh-TW.{{extension.element.lower}}.sys.ini b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/zh-TW/zh-TW.{{extension.element.lower}}.sys.ini new file mode 100644 index 00000000..ca96af4b --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/zh-TW/zh-TW.{{extension.element.lower}}.sys.ini @@ -0,0 +1,18 @@ +; {ORGANIZATION} Extension +; Copyright (C) 2012 {ORGANIZATION}. All rights reserved. +; License GNU General Public License version 2 or later., see LICENSE.php +; Note : All ini files need to be saved as UTF-8 - No BOM + +{{extension.element.upper}}="{{extension.name.cap}} 元件" +{{extension.name.upper}}="{{extension.name.cap}} 元件" +{{extension.element.upper}}_XML_DESCRIPTION="" +{{extension.element.upper}}_INSTALL_MSG="這是 {{extension.name.cap}} 元件。" + +; Version 3.0 +{{extension.element.upper}}_LIST_VIEW_DESC="列出項目" +{{extension.element.upper}}_ITEM_VIEW_DEFAULT_DESC="顯示單一項目" + +; {{controller.item.name.cap}} +{{extension.element.upper}}_{{controller.list.name.upper}}="{{controller.list.name.cap}}" +{{extension.element.upper}}_{{controller.item.name.upper}}_VIEW_DEFAULT_TITLE="{{controller.item.name.cap}} 單一項目" +{{extension.element.upper}}_{{controller.list.name.upper}}_VIEW_DEFAULT_TITLE="{{controller.list.name.cap}} 列表" \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/zh-TW/zh-TW.{{extension.element.lower}}.{{controller.item.name.lower}}.ini b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/zh-TW/zh-TW.{{extension.element.lower}}.{{controller.item.name.lower}}.ini new file mode 100644 index 00000000..06e121a1 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/language/zh-TW/zh-TW.{{extension.element.lower}}.{{controller.item.name.lower}}.ini @@ -0,0 +1,5 @@ +; {ORGANIZATION} Extension +; Copyright (C) 2012 {ORGANIZATION}. All rights reserved. +; License GNU General Public License version 2 or later., see LICENSE.php +; Note : All ini files need to be saved as UTF-8 - No BOM + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/model/field/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/model/field/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/model/field/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/model/field/{{controller.item.name.lower}}/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/model/field/{{controller.item.name.lower}}/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/model/field/{{controller.item.name.lower}}/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/model/field/{{controller.item.name.lower}}/list.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/model/field/{{controller.item.name.lower}}/list.php new file mode 100644 index 00000000..dd0b8c08 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/model/field/{{controller.item.name.lower}}/list.php @@ -0,0 +1,61 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/model/form/{{controller.item.name.lower}}.xml b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/model/form/{{controller.item.name.lower}}.xml new file mode 100644 index 00000000..8d7f1c4a --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/model/form/{{controller.item.name.lower}}.xml @@ -0,0 +1,198 @@ + +
+ + + + +
+ + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+ +
+ + + + + +
+ + + + +
+ +
+ + +
+ + + + + + + +
+ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/model/form/{{controller.list.name.lower}}/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/model/form/{{controller.list.name.lower}}/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/model/form/{{controller.list.name.lower}}/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/model/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/model/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/model/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/model/{{controller.item.name.lower}}.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/model/{{controller.item.name.lower}}.php new file mode 100644 index 00000000..a71d54ea --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/model/{{controller.item.name.lower}}.php @@ -0,0 +1,110 @@ +addTable('{{controller.item.name.lower}}', '#__{{extension.name.lower}}_{{controller.list.name.lower}}') + ->addTable('category', '#__categories', '{{controller.item.name.lower}}.catid = category.id') + ->addTable('user', '#__users', '{{controller.item.name.lower}}.created_by = user.id') + ->addTable('viewlevel', '#__viewlevels', '{{controller.item.name.lower}}.access = viewlevel.id') + ->addTable('lang', '#__languages', '{{controller.item.name.lower}}.language = lang.lang_code'); + } + + /** + * The prepare getQuery hook + * + * @param JDatabaseQuery $query The db query object. + * + * @return void + */ + protected function prepareGetQuery(\JDatabaseQuery $query) + { + } + + /** + * The post getQuery object. + * + * @param JDatabaseQuery $query The db query object. + * + * @return void + */ + protected function postGetQuery(\JDatabaseQuery $query) + { + } + + /** + * Method to auto-populate the model state. + * + * This method will only called in constructor. Using `ignore_request` to ignore this method. + * + * @param string $ordering An optional ordering field. + * @param string $direction An optional direction (asc|desc). + * + * @return void + */ + protected function populateState($ordering = '{{controller.item.name.lower}}.id', $direction = 'DESC') + { + // Build ordering prefix + if (!$ordering) + { + $table = $this->getTable('{{controller.item.name.cap}}'); + + $ordering = property_exists($table, 'ordering') ? '{{controller.item.name.lower}}.ordering' : '{{controller.item.name.lower}}.id'; + + $ordering = property_exists($table, 'catid') ? '{{controller.item.name.lower}}.catid, ' . $ordering : $ordering; + } + + parent::populateState($ordering, $direction); + } + + /** + * Process the query filters. + * + * @param JDatabaseQuery $query The query object. + * @param array $filters The filters values. + * + * @return JDatabaseQuery The db query object. + */ + protected function processFilters(\JDatabaseQuery $query, $filters = array()) + { + // If no state filter, set published >= 0 + if (!isset($filters['{{controller.item.name.lower}}.state']) && property_exists($this->getTable(), 'state')) + { + $query->where($query->quoteName('{{controller.item.name.lower}}.state') . ' >= 0'); + } + + return parent::processFilters($query, $filters); + } + + /** + * Configure the filter handlers. + * + * Example: + * ``` php + * $filterHelper->setHandler( + * '{{controller.item.name.lower}}.date', + * function($query, $field, $value) + * { + * $query->where($field . ' >= ' . $value); + * } + * ); + * ``` + * + * @param FilterHelper $filterHelper The filter helper object. + * + * @return void + */ + protected function configureFilters($filterHelper) + { + } + + /** + * Configure the search handlers. + * + * Example: + * ``` php + * $searchHelper->setHandler( + * '{{controller.item.name.lower}}.title', + * function($query, $field, $value) + * { + * return $query->quoteName($field) . ' LIKE ' . $query->quote('%' . $value . '%'); + * } + * ); + * ``` + * + * @param SearchHelper $searchHelper The search helper object. + * + * @return void + */ + protected function configureSearches($searchHelper) + { + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/sql/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/sql/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/sql/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/sql/install.sql b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/sql/install.sql new file mode 100644 index 00000000..cce30d9d --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/sql/install.sql @@ -0,0 +1,19 @@ + +CREATE TABLE IF NOT EXISTS `#__{{extension.name.lower}}_{{controller.list.name.lower}}` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary Key', + `title` varchar(255) NOT NULL COMMENT 'Record title', + `alias` varchar(255) NOT NULL COMMENT 'URL Alias', + `introtext` mediumtext NOT NULL COMMENT 'Intro', + `fulltext` mediumtext NOT NULL COMMENT 'Full content', + `images` text NOT NULL COMMENT 'Images', + `created` datetime NOT NULL COMMENT 'Created time', + `created_by` int(11) NOT NULL COMMENT 'Author', + `modified` datetime NOT NULL COMMENT 'Modified time', + `modified_by` int(11) NOT NULL COMMENT 'Modified user', + `state` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Record state', + `params` text NOT NULL COMMENT 'Params', + PRIMARY KEY (`id`), + KEY `idx_access` (`access`), + KEY `idx_alias` (`alias`), + KEY `idx_created_by` (`created_by`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ; diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/sql/uninstall.sql b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/sql/uninstall.sql new file mode 100644 index 00000000..412473f1 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/sql/uninstall.sql @@ -0,0 +1 @@ +DROP TABLE `#__{{extension.name.lower}}_{{controller.list.name.lower}}`; \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/init.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/init.php new file mode 100644 index 00000000..4224e051 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/init.php @@ -0,0 +1,31 @@ +enqueueMessage('Windwalker Framework not found.', 'error'); + + return false; +} + +include_once JPATH_LIBRARIES . '/windwalker/src/init.php'; + +if (is_dir(JPATH_BASE . '/components/{{extension.element.lower}}')) +{ + JLoader::registerPrefix('{{extension.name.cap}}', JPATH_BASE . '/components/{{extension.element.lower}}'); + JLoader::register('{{extension.name.cap}}Component', JPATH_BASE . '/components/{{extension.element.lower}}/component.php'); +} + +JLoader::registerNamespace('{{extension.name.cap}}', JPATH_ADMINISTRATOR . '/components/{{extension.element.lower}}/src'); +JLoader::registerNamespace('Windwalker', __DIR__); + +return true; diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Component/TaskMapper.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Component/TaskMapper.php new file mode 100644 index 00000000..3597b233 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Component/TaskMapper.php @@ -0,0 +1,32 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Component/{{extension.name.cap}}Component.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Component/{{extension.name.cap}}Component.php new file mode 100644 index 00000000..9b6920c6 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Component/{{extension.name.cap}}Component.php @@ -0,0 +1,85 @@ +container->registerServiceProvider(new {{extension.name.cap}}Provider); + + // Load language + $lang = $this->container->get('language'); + + LanguageHelper::loadAll($lang->getTag(), $this->option); + + // Load asset + $asset = $this->container->get('helper.asset'); + + $asset->windwalker(); + + // Register tasks + TaskMapper::register($this); + + parent::prepare(); + } + + /** + * Post execute hook. + * + * @param mixed $result The return value of this component. + * + * @return mixed The return value of this component. + */ + protected function postExecute($result) + { + $doc = \JFactory::getDocument(); + + // Debug profiler + if (JDEBUG && $doc->getType() === 'html') + { + $result .= "
" . ProfilerHelper::render('Windwalker', true); + } + + return parent::postExecute($result); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Config/Config.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Config/Config.php new file mode 100644 index 00000000..d3c057fc --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Config/Config.php @@ -0,0 +1,42 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Listener/Lite/LiteListener.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Listener/Lite/LiteListener.php new file mode 100644 index 00000000..1fcb2206 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Listener/Lite/LiteListener.php @@ -0,0 +1,369 @@ +text is also available. + * @param object $params The content params. + * @param int $page The 'page' number. + * + * @return void + */ + public function onContentPrepare($context, $article, $params, $page = 0) + { + $app = JFactory::getApplication(); + + // Do some stuff + } + + /** + * {{extension.name.cap}} after display title method + * Method is called by the view and the results are imploded and displayed in a placeholder + * + * @param string $context The context of the content being passed to the plugin. + * @param object $article The content object. Note $article->text is also available. + * @param object $params The content params. + * @param int $page The 'page' number. + * + * @return string + */ + public function onContentAfterTitle($context, $article, $params, $page = 0) + { + $app = JFactory::getApplication(); + $result = null; + + // Do some stuff + + return $result; + } + + /** + * {{extension.name.cap}} before display content method + * Method is called by the view and the results are imploded and displayed in a placeholder + * + * @param string $context The context of the content being passed to the plugin. + * @param object $article The content object. Note $article->text is also available. + * @param object $params The content params. + * @param int $page The 'page' number. + * + * @return string + */ + public function onContentBeforeDisplay($context, $article, $params, $page = 0) + { + $app = JFactory::getApplication(); + $result = null; + + // Do some stuff + + return $result; + } + + /** + * {{extension.name.cap}} after display content method + * Method is called by the view and the results are imploded and displayed in a placeholder + * + * @param string $context The context of the content being passed to the plugin. + * @param object $article The content object. Note $article->text is also available. + * @param object $params The content params. + * @param int $page The 'page' number. + * + * @return string + */ + public function onContentAfterDisplay($context, $article, $params, $page = 0) + { + $app = JFactory::getApplication(); + $result = null; + + // Do some stuff + + return $result; + } + + /** + * {{extension.name.cap}} before save content method + * Method is called right before content is saved into the database. + * Article object is passed by reference, so any changes will be saved! + * NOTE: Returning false will abort the save with an error. + *You can set the error by calling $article->setError($message) + * + * @param string $context The context of the content being passed to the plugin. + * @param object $article A JTableContent object. + * @param bool $isNew If the content is just about to be created. + * + * @return bool If false, abort the save. + */ + public function onContentBeforeSave($context, $article, $isNew) + { + $app = JFactory::getApplication(); + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + /** + * {{extension.name.cap}} after save content method + * Article is passed by reference, but after the save, so no changes will be saved. + * Method is called right after the content is saved + * + * @param string $context The context of the content being passed to the plugin. + * @param object $article A JTableContent object. + * @param boolean $isNew If the content is just about to be created. + * + * @return boolean + */ + public function onContentAfterSave($context, $article, $isNew) + { + $app = JFactory::getApplication(); + + // Do some stuff + + return true; + } + + /** + * {{extension.name.cap}} before delete method. + * + * @param string $context The context for the content passed to the plugin. + * @param object $data The data relating to the content that is to be deleted. + * + * @return boolean False to abort. + */ + public function onContentBeforeDelete($context, $data) + { + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + /** + * {{extension.name.cap}} after delete method. + * + * @param string $context The context for the content passed to the plugin. + * @param object $data The data relating to the content that is to be deleted. + * + * @return boolean + */ + public function onContentAfterDelete($context, $data) + { + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + /** + * {{extension.name.cap}} on change state method. + * + * @param string $context The context for the content passed to the plugin. + * @param array $pks A list of primary key ids of the content that has changed state. + * @param int $value The value of the state that the content has been changed to. + * + * @return boolean + */ + public function onContentChangeState($context, $pks, $value) + { + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + + + // Form Events + // ==================================================================================== + + /** + * Pre process form hook. + * + * @param JForm $form The form to be altered. + * @param array $data The associated data for the form. + * + * @return boolean + */ + public function onContentPrepareForm($form, $data) + { + $app = JFactory::getApplication(); + $result = null; + + // Do some stuff + + return $result; + } + + // User Events + // ==================================================================================== + + /** + * Utility method to act on a user after it has been saved. + * + * @param array $user Holds the new user data. + * @param boolean $isNew True if a new user is stored. + * @param boolean $success True if user was succesfully stored in the database. + * @param string $msg Message. + * + * @return boolean + */ + public function onUserBeforeSave($user, $isNew, $success, $msg = null) + { + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + /** + * Utility method to act on a user after it has been saved. + * + * @param array $user Holds the new user data. + * @param boolean $isNew True if a new user is stored. + * @param boolean $success True if user was succesfully stored in the database. + * @param string $msg Message. + * + * @return boolean + */ + public function onUserAfterSave($user, $isNew, $success, $msg = null) + { + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + /** + * This method should handle any login logic and report back to the subject + * + * @param array $user Holds the user data + * @param array $options Array holding options (remember, autoregister, group) + * + * @return boolean True on success + */ + public function onUserLogin($user, $options = array()) + { + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + /** + * This method should handle any logout logic and report back to the subject + * + * @param array $user Holds the user data. + * @param array $options Array holding options (client, ...). + * + * @return object True on success + */ + public function onUserLogout($user, $options = array()) + { + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + /** + * Utility method to act on a user before it has been saved. + * + * @param array $user Holds the new user data. + * @param boolean $isnew True if a new user is stored. + * @param boolean $success True if user was succesfully stored in the database. + * @param string $msg Message. + * + * @return boolean + */ + public function onUserBeforeDelete($user, $isnew, $success, $msg = null) + { + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + /** + * Remove all sessions for the user name + * + * @param array $user Holds the user data + * @param boolean $success True if user was succesfully stored in the database + * @param string $msg Message + * + * @return boolean + */ + public function onUserAfterDelete($user, $success, $msg = null) + { + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + /** + * Prepare content data. + * + * @param string $context The context for the data + * @param int $data The user id + * + * @return boolean + */ + public function onContentPrepareData($context, $data) + { + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + /** + * resultBool + * + * @param array $result + * + * @return bool + */ + public function resultBool($result = array()) + { + if (in_array(false, $result)) + { + return false; + } + + return true; + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Listener/Lite/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Listener/Lite/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Listener/Lite/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Listener/Pro/ProListener.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Listener/Pro/ProListener.php new file mode 100644 index 00000000..9e3fb4bb --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Listener/Pro/ProListener.php @@ -0,0 +1,406 @@ +text is also available. + * @param object $params The content params. + * @param int $page The 'page' number. + * + * @return void + */ + public function onContentPrepare($context, $article, $params, $page = 0) + { + $app = JFactory::getApplication(); + + // Do some stuff + } + + /** + * {{extension.name.cap}} after display title method + * Method is called by the view and the results are imploded and displayed in a placeholder + * + * @param string $context The context of the content being passed to the plugin. + * @param object $article The content object. Note $article->text is also available. + * @param object $params The content params. + * @param int $page The 'page' number. + * + * @return string + */ + public function onContentAfterTitle($context, $article, $params, $page = 0) + { + $app = JFactory::getApplication(); + $result = null; + + // Do some stuff + + return $result; + } + + /** + * {{extension.name.cap}} before display content method + * Method is called by the view and the results are imploded and displayed in a placeholder + * + * @param string $context The context of the content being passed to the plugin. + * @param object $article The content object. Note $article->text is also available. + * @param object $params The content params. + * @param int $page The 'page' number. + * + * @return string + */ + public function onContentBeforeDisplay($context, $article, $params, $page = 0) + { + $app = JFactory::getApplication(); + $result = null; + + // Do some stuff + + return $result; + } + + /** + * {{extension.name.cap}} after display content method + * Method is called by the view and the results are imploded and displayed in a placeholder + * + * @param string $context The context of the content being passed to the plugin. + * @param object $article The content object. Note $article->text is also available. + * @param object $params The content params. + * @param int $page The 'page' number. + * + * @return string + */ + public function onContentAfterDisplay($context, $article, $params, $page = 0) + { + $app = JFactory::getApplication(); + $result = null; + + // Do some stuff + + return $result; + } + + /** + * {{extension.name.cap}} before save content method + * Method is called right before content is saved into the database. + * Article object is passed by reference, so any changes will be saved! + * NOTE: Returning false will abort the save with an error. + *You can set the error by calling $article->setError($message) + * + * @param string $context The context of the content being passed to the plugin. + * @param object $article A JTableContent object. + * @param bool $isNew If the content is just about to be created. + * + * @return bool If false, abort the save. + */ + public function onContentBeforeSave($context, $article, $isNew) + { + $app = JFactory::getApplication(); + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + /** + * {{extension.name.cap}} after save content method + * Article is passed by reference, but after the save, so no changes will be saved. + * Method is called right after the content is saved + * + * @param string $context The context of the content being passed to the plugin. + * @param object $article A JTableContent object. + * @param boolean $isNew If the content is just about to be created. + * + * @return boolean + */ + public function onContentAfterSave($context, $article, $isNew) + { + $app = JFactory::getApplication(); + + // Do some stuff + + return true; + } + + /** + * {{extension.name.cap}} before delete method. + * + * @param string $context The context for the content passed to the plugin. + * @param object $data The data relating to the content that is to be deleted. + * + * @return boolean False to abort. + */ + public function onContentBeforeDelete($context, $data) + { + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + /** + * {{extension.name.cap}} after delete method. + * + * @param string $context The context for the content passed to the plugin. + * @param object $data The data relating to the content that is to be deleted. + * + * @return boolean + */ + public function onContentAfterDelete($context, $data) + { + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + /** + * {{extension.name.cap}} on change state method. + * + * @param string $context The context for the content passed to the plugin. + * @param array $pks A list of primary key ids of the content that has changed state. + * @param int $value The value of the state that the content has been changed to. + * + * @return boolean + */ + public function onContentChangeState($context, $pks, $value) + { + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + + + // Form Events + // ==================================================================================== + + /** + * Pre process form hook. + * + * @param \JForm $form The form to be altered. + * @param array $data The associated data for the form. + * + * @return boolean + */ + public function onContentPrepareForm($form, $data) + { + $app = JFactory::getApplication(); + $result = null; + + // Do some stuff + + return $result; + } + + // User Events + // ==================================================================================== + + /** + * Utility method to act on a user after it has been saved. + * + * @param array $user Holds the new user data. + * @param boolean $isNew True if a new user is stored. + * @param boolean $success True if user was succesfully stored in the database. + * @param string $msg Message. + * + * @return boolean + */ + public function onUserBeforeSave($user, $isNew, $success, $msg = null) + { + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + /** + * Utility method to act on a user after it has been saved. + * + * @param array $user Holds the new user data. + * @param boolean $isNew True if a new user is stored. + * @param boolean $success True if user was succesfully stored in the database. + * @param string $msg Message. + * + * @return boolean + */ + public function onUserAfterSave($user, $isNew, $success, $msg = null) + { + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + /** + * This method should handle any login logic and report back to the subject + * + * @param array $user Holds the user data + * @param array $options Array holding options (remember, autoregister, group) + * + * @return boolean True on success + */ + public function onUserLogin($user, $options = array()) + { + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + /** + * This method should handle any logout logic and report back to the subject + * + * @param array $user Holds the user data. + * @param array $options Array holding options (client, ...). + * + * @return object True on success + */ + public function onUserLogout($user, $options = array()) + { + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + /** + * Utility method to act on a user before it has been saved. + * + * @param array $user Holds the new user data. + * @param boolean $isnew True if a new user is stored. + * @param boolean $success True if user was succesfully stored in the database. + * @param string $msg Message. + * + * @return boolean + */ + public function onUserBeforeDelete($user, $isnew, $success, $msg = null) + { + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + /** + * Remove all sessions for the user name + * + * @param array $user Holds the user data + * @param boolean $success True if user was succesfully stored in the database + * @param string $msg Message + * + * @return boolean + */ + public function onUserAfterDelete($user, $success, $msg = null) + { + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + /** + * Prepare content data. + * + * @param string $context The context for the data + * @param int $data The user id + * + * @return boolean + */ + public function onContentPrepareData($context, $data) + { + $result = array(); + + // Do some stuff + + return $this->resultBool($result); + } + + /** + * resultBool + * + * @param array $result + * + * @return bool + */ + public function resultBool($result = array()) + { + if (in_array(false, $result)) + { + return false; + } + + return true; + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Listener/Pro/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Listener/Pro/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Listener/Pro/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Listener/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Listener/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Listener/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Mapper/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Mapper/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Mapper/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Mapper/{{controller.item.name.cap}}Mapper.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Mapper/{{controller.item.name.cap}}Mapper.php new file mode 100644 index 00000000..a760c2bc --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Mapper/{{controller.item.name.cap}}Mapper.php @@ -0,0 +1,28 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Provider/{{extension.name.cap}}Provider.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Provider/{{extension.name.cap}}Provider.php new file mode 100644 index 00000000..4694eb98 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/Provider/{{extension.name.cap}}Provider.php @@ -0,0 +1,33 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/src/{{extension.name.cap}}/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/table/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/table/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/table/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/table/{{controller.item.name.lower}}.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/table/{{controller.item.name.lower}}.php new file mode 100644 index 00000000..d93c47c2 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/table/{{controller.item.name.lower}}.php @@ -0,0 +1,139 @@ +getKeyName(); + + return '{{extension.element.lower}}.{{controller.item.name.lower}}.' . $this->$key; + } + + /** + * Method to return the title to use for the asset table. + * + * In tracking the assets a title is kept for each asset so that there is some context available in a unified access manager. + * Usually this would just return $this->title or $this->name or whatever is being used for the primary name of the row. + * If this method is not overridden, the asset name is used. + * + * @return string The string to use as the title in the asset table. + */ + protected function _getAssetTitle() + { + if (property_exists($this, 'title')) + { + return $this->title; + } + + return $this->_getAssetName(); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.item.name.lower}}/html.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.item.name.lower}}/html.php new file mode 100644 index 00000000..726b49c2 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.item.name.lower}}/html.php @@ -0,0 +1,90 @@ +engine = new PhpEngine; + + parent::__construct($model, $container, $config, $paths); + } + + /** + * Prepare data hook. + * + * @return void + */ + protected function prepareData() + { + /** @var {{extension.name.cap}}Model{{controller.item.name.cap}} */ + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.item.name.lower}}/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.item.name.lower}}/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.item.name.lower}}/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.item.name.lower}}/tmpl/edit.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.item.name.lower}}/tmpl/edit.php new file mode 100644 index 00000000..783f7416 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.item.name.lower}}/tmpl/edit.php @@ -0,0 +1,68 @@ +getContainer(); +$form = $data->form; +$item = $data->item; + +// Setting tabset +$tabs = array( + 'tab_basic' +); +?> + + + +
+
+ + viewObject); ?> + + 'tab_basic')); ?> + + loadTemplate($tab, array('tab' => $tab)); + } + ?> + + + + +
+ + + +
+
+
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.item.name.lower}}/tmpl/edit_fieldset.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.item.name.lower}}/tmpl/edit_fieldset.php new file mode 100644 index 00000000..a8d1b246 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.item.name.lower}}/tmpl/edit_fieldset.php @@ -0,0 +1,23 @@ +fieldset; +?> +
+ + label ? JText::_($fieldset->label) : JText::_('{{extension.element.upper}}_EDIT_FIELDSET_' . $fieldset->name); ?> + + + form->getFieldset($fieldset->name) as $field): ?> +
+ renderField() . "\n\n"; ?> +
+ +
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.item.name.lower}}/tmpl/edit_tab_basic.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.item.name.lower}}/tmpl/edit_tab_basic.php new file mode 100644 index 00000000..f3f8be5f --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.item.name.lower}}/tmpl/edit_tab_basic.php @@ -0,0 +1,29 @@ +tab; +$fieldsets = $data->form->getFieldsets(); +?> + +view->option . '_EDIT_' . strtoupper($tab))) ?> + +
+
+ loadTemplate('fieldset', array('fieldset' => $fieldsets['information'], 'class' => 'form-horizontal')); ?> + + loadTemplate('fieldset', array('fieldset' => $fieldsets['text'], 'class' => 'form-horizontal')); ?> +
+ +
+ loadTemplate('fieldset', array('fieldset' => $fieldsets['publish'], 'class' => 'form-horizontal')); ?> +
+
+ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.item.name.lower}}/tmpl/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.item.name.lower}}/tmpl/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.item.name.lower}}/tmpl/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.list.name.lower}}/html.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.list.name.lower}}/html.php new file mode 100644 index 00000000..e07563d0 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.list.name.lower}}/html.php @@ -0,0 +1,133 @@ + '{{extension.element.lower}}', + 'view_name' => '{{controller.item.name.lower}}', + 'view_item' => '{{controller.item.name.lower}}', + 'view_list' => '{{controller.list.name.lower}}', + + // Column which we allow to drag sort + 'order_column' => '{{controller.item.name.lower}}.catid, {{controller.item.name.lower}}.ordering', + + // Table id + 'order_table_id' => '{{controller.item.name.lower}}List', + + // Ignore user access, allow all. + 'ignore_access' => false + ); + + // Directly use php engine + $this->engine = new PhpEngine; + + parent::__construct($model, $container, $config, $paths); + } + + /** + * Prepare data hook. + * + * @return void + */ + protected function prepareData() + { + $data = $this->getData(); + + // + } + + /** + * Configure the toolbar button set. + * + * @param array $buttonSet Customize button set. + * @param object $canDo Access object. + * + * @return array + */ + protected function configureToolbar($buttonSet = array(), $canDo = null) + { + // Get default button set. + $buttonSet = parent::configureToolbar($buttonSet, $canDo); + + // In debug mode, we remove trash button but use delete button instead. + // if (JDEBUG) + { + $buttonSet['trash']['access'] = false; + $buttonSet['delete']['access'] = true; + } + + return $buttonSet; + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.list.name.lower}}/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.list.name.lower}}/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.list.name.lower}}/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.list.name.lower}}/tmpl/default.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.list.name.lower}}/tmpl/default.php new file mode 100644 index 00000000..6c1eacfa --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.list.name.lower}}/tmpl/default.php @@ -0,0 +1,58 @@ +getContainer(); +$grid = $data->grid; +?> + +
+
+ + data->sidebar)): ?> +
+ + data->sidebar; ?> +
+
+ +
+ + + + + + +
+ + + +
+ +
+ +
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.list.name.lower}}/tmpl/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.list.name.lower}}/tmpl/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/view/{{controller.list.name.lower}}/tmpl/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/{{extension.name.lower}}.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/{{extension.name.lower}}.php new file mode 100644 index 00000000..6b41f2fd --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/{{extension.name.lower}}.php @@ -0,0 +1,18 @@ +execute(); diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/{{extension.name.lower}}.xml b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/{{extension.name.lower}}.xml new file mode 100644 index 00000000..bda25a96 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/administrator/{{extension.name.lower}}.xml @@ -0,0 +1,103 @@ + + + {{extension.element.lower}} + 2014-1-11 + Copyright (C) 2016. All rights reserved. + GNU General Public License version 2 or later. + + + example.com + 1.0.0 + {{extension.element.upper}}_XML_DESCRIPTION + + install.php + + + + + + sql/uninstall.sql + + + + + + asset + controller + helper + images + layouts + model + router + view + component.php + {{extension.name.lower}}.php + index.html + router.php + + + + {{extension.element.upper}} + + + + + asset + controller + etc + helper + helpers + images + language + model + sql + src + table + view + access.xml + component.php + composer.json + config.xml + {{extension.name.lower}}.php + index.html + install.php + + + + + + + + + + + + + + + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/asset/css/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/asset/css/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/asset/css/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/asset/css/main.css b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/asset/css/main.css new file mode 100644 index 00000000..e69b51a8 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/asset/css/main.css @@ -0,0 +1,33 @@ +/*! + * {{extension.element.lower}} + * + * Copyright 2016 {ORGANIZATION} + * License GNU General Public License version 2 or later.. + */ + + +/* GLOBAL */ + + +/* BODY */ + + +/* TYPO */ + + +/* LAYOUT */ + + +/* CONTENT */ + + +/* FILTER */ + + +/* TABLE */ + + +/* FORM */ + + +/* FOOTER */ diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/asset/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/asset/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/asset/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/asset/js/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/asset/js/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/asset/js/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/asset/js/main.js b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/asset/js/main.js new file mode 100644 index 00000000..8683fa30 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/asset/js/main.js @@ -0,0 +1,8 @@ +/** +* @package Joomla.Site +* @subpackage {{extension.element.lower}} +* @copyright Copyright (C) 2016 {ORGANIZATION}. All rights reserved. +* @license GNU General Public License version 2 or later. +*/ + +var {{extension.name.cap}} = {}; \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/component.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/component.php new file mode 100644 index 00000000..efa14f3f --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/component.php @@ -0,0 +1,36 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/controller/{{controller.item.name.lower}}/delegator.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/controller/{{controller.item.name.lower}}/delegator.php new file mode 100644 index 00000000..ebd936a9 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/controller/{{controller.item.name.lower}}/delegator.php @@ -0,0 +1,44 @@ +config['allow_url_params'] = array( + 'type' + ); + + return parent::createController($class); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/controller/{{controller.item.name.lower}}/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/controller/{{controller.item.name.lower}}/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/controller/{{controller.item.name.lower}}/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/controller/{{controller.list.name.lower}}/delegator.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/controller/{{controller.list.name.lower}}/delegator.php new file mode 100644 index 00000000..df851ed4 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/controller/{{controller.list.name.lower}}/delegator.php @@ -0,0 +1,40 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/helper/helper.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/helper/helper.php new file mode 100644 index 00000000..44e2433b --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/helper/helper.php @@ -0,0 +1,18 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/helpers/category.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/helpers/category.php new file mode 100644 index 00000000..02cef524 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/helpers/category.php @@ -0,0 +1,33 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/images/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/images/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/images/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/layouts/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/layouts/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/layouts/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/model/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/model/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/model/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/model/{{controller.item.name.lower}}.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/model/{{controller.item.name.lower}}.php new file mode 100644 index 00000000..e8f98c7d --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/model/{{controller.item.name.lower}}.php @@ -0,0 +1,73 @@ +addTable('{{controller.item.name.lower}}', '#__{{extension.name.lower}}_{{controller.list.name.lower}}') + ->addTable('category', '#__categories', '{{controller.item.name.lower}}.catid = category.id') + ->addTable('user', '#__users', '{{controller.item.name.lower}}.created_by = user.id') + ->addTable('viewlevel', '#__viewlevels', '{{controller.item.name.lower}}.access = viewlevel.id') + ->addTable('lang', '#__languages', '{{controller.item.name.lower}}.language = lang.lang_code'); + } + + /** + * The prepare getQuery hook + * + * @param JDatabaseQuery $query The db query object. + * + * @return void + */ + protected function prepareGetQuery(\JDatabaseQuery $query) + { + parent::prepareGetQuery($query); + } + + /** + * The post getQuery object. + * + * @param JDatabaseQuery $query The db query object. + * + * @return void + */ + protected function postGetQuery(\JDatabaseQuery $query) + { + } + + /** + * Method to auto-populate the model state. + * + * This method will only called in constructor. Using `ignore_request` to ignore this method. + * + * @param string $ordering An optional ordering field. + * @param string $direction An optional direction (asc|desc). + * + * @return void + */ + protected function populateState($ordering = null, $direction = null) + { + parent::populateState($ordering, 'ASC'); + } + + /** + * Configure the filter handlers. + * + * Example: + * ``` php + * $filterHelper->setHandler( + * '{{controller.item.name.lower}}.date', + * function($query, $field, $value) + * { + * $query->where($field . ' >= ' . $value); + * } + * ); + * ``` + * + * @param FilterHelper $filterHelper The filter helper object. + * + * @return void + */ + protected function configureFilters($filterHelper) + { + } + + /** + * Configure the search handlers. + * + * Example: + * ``` php + * $searchHelper->setHandler( + * '{{controller.item.name.lower}}.title', + * function($query, $field, $value) + * { + * return $query->quoteName($field) . ' LIKE ' . $query->quote('%' . $value . '%'); + * } + * ); + * ``` + * + * @param SearchHelper $searchHelper The search helper object. + * + * @return void + */ + protected function configureSearches($searchHelper) + { + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/router.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/router.php new file mode 100644 index 00000000..c9aa0e5e --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/router.php @@ -0,0 +1,41 @@ +attachRule(new JComponentRouterRulesMenu($this)); + $this->attachRule(new JComponentRouterRulesStandard($this)); + $this->attachRule(new JComponentRouterRulesNomenu($this)); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/router/handler/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/router/handler/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/router/handler/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/router/handler/{{controller.item.name.lower}}.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/router/handler/{{controller.item.name.lower}}.php new file mode 100644 index 00000000..2790652e --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/router/handler/{{controller.item.name.lower}}.php @@ -0,0 +1,54 @@ +setKey('id') + ->setParent($this->router->getView('{{controller.list.name.lower}}'), 'catid') + ->addLayout('default'); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/router/handler/{{controller.list.name.lower}}.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/router/handler/{{controller.list.name.lower}}.php new file mode 100644 index 00000000..12b3746b --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/router/handler/{{controller.list.name.lower}}.php @@ -0,0 +1,47 @@ +setKey('id') + ->setNestable() + ->addLayout('default'); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/router/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/router/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/router/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.item.name.lower}}/html.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.item.name.lower}}/html.php new file mode 100644 index 00000000..e45bf4ba --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.item.name.lower}}/html.php @@ -0,0 +1,85 @@ +link = Route::view('{{controller.item.name.lower}}', array( + 'id' => $item->id . ':' . $item->alias, + 'catid' => $item->catid + )); + + $item->text = $item->introtext . $item->fulltext; + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.item.name.lower}}/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.item.name.lower}}/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.item.name.lower}}/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.item.name.lower}}/tmpl/default.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.item.name.lower}}/tmpl/default.php new file mode 100644 index 00000000..49872d0f --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.item.name.lower}}/tmpl/default.php @@ -0,0 +1,78 @@ +getContainer(); +$params = $data->params; +$item = $data->item; +?> + +
+ +
+
+ +
+
+ + + +
+

link, $this->escape($item->title)); ?>

+
+ + + + + +
+
+ +
+ images)): ?> +
+ escape($item->images), $this->escape($item->title)); ?> +
+ + + + +
+ text; ?> +
+ + +
+ +
+
+ + +
+
+ +
+
+ +
+ + + + +
+
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.item.name.lower}}/tmpl/default.xml b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.item.name.lower}}/tmpl/default.xml new file mode 100644 index 00000000..9f98e57a --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.item.name.lower}}/tmpl/default.xml @@ -0,0 +1,27 @@ + + + + + + + + + + +
+ + +
+
+ + + + + +
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.item.name.lower}}/tmpl/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.item.name.lower}}/tmpl/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.item.name.lower}}/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.list.name.lower}}/html.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.list.name.lower}}/html.php new file mode 100644 index 00000000..a13ce08a --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.list.name.lower}}/html.php @@ -0,0 +1,83 @@ +data->items as &$item) + { + $item = new Data($item); + + $item->text = $item->introtext; + + // Link + // ===================================================================================== + $item->link = Route::view('{{controller.item.name.lower}}', array( + 'id' => $item->id . ':' . $item->alias, + 'catid' => $item->catid + )); + } + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.list.name.lower}}/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.list.name.lower}}/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.list.name.lower}}/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.list.name.lower}}/tmpl/default.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.list.name.lower}}/tmpl/default.php new file mode 100644 index 00000000..74c8101e --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.list.name.lower}}/tmpl/default.php @@ -0,0 +1,68 @@ +getContainer(); +$data = $this->data; +$state = $data->state; +$user = $container->get('user'); +?> +
+ +
+
+ + +
+ + + items)): ?> + + items as $key => &$item): ?> +
+ loadTemplate('item', array('item' => $item)); ?> +
+ + + + + + + + + + + +
+
+ + +
+ + + +
+
+ +
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.list.name.lower}}/tmpl/default.xml b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.list.name.lower}}/tmpl/default.xml new file mode 100644 index 00000000..6587dc74 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.list.name.lower}}/tmpl/default.xml @@ -0,0 +1,30 @@ + + + + + + + + + + +
+ + + + +
+
+ + + + + +
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.list.name.lower}}/tmpl/default_item.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.list.name.lower}}/tmpl/default_item.php new file mode 100644 index 00000000..f96c99f1 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.list.name.lower}}/tmpl/default_item.php @@ -0,0 +1,79 @@ +getContainer(); +$data = $this->data; +$state = $data->state; +$user = $container->get('user'); +$item = $data->item; + +?> +
+
+ + + +
+

+ link, $item->title) ?> +

+
+ + + + + +
+
+ + images)): ?> +
+ escape($item->images), $this->escape($item->title)); ?> +
+ + + + +
+ text; ?> +
+ + +
+
+ + + + + +
+
+

+

+ + + +

+
+
+ + + +
+
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.list.name.lower}}/tmpl/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.list.name.lower}}/tmpl/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/view/{{controller.list.name.lower}}/tmpl/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/{{extension.name.lower}}.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/{{extension.name.lower}}.php new file mode 100644 index 00000000..6b41f2fd --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/component/simple/site/{{extension.name.lower}}.php @@ -0,0 +1,18 @@ +execute(); diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/helper/helper.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/helper/helper.php new file mode 100644 index 00000000..fb27b9de --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/helper/helper.php @@ -0,0 +1,81 @@ + $table) + { + if (empty(self::$columns[$table])) + { + self::$columns[$table] = $db->getTableColumns($table); + } + + $columns = self::$columns[$table]; + + if ($all) + { + $select[] = "`{$k}`.*"; + } + + foreach ($columns as $key => $var) + { + $fields[] = $db->qn("{$k}.{$key}", "{$k}_{$key}"); + } + + $i = ord($i); + $i++; + $i = chr($i); + } + + return $final = implode(",", $select) . ",\n" . implode(",\n", $fields); + } + + /** + * Escape text for safe. + * + * @param string $text Text to escape. + * + * @return string Escaped text. + */ + public static function escape($text) + { + return htmlspecialchars($text); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/helper/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/helper/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/helper/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/install.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/install.php new file mode 100644 index 00000000..a54f2310 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/install.php @@ -0,0 +1,80 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/language/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/language/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/language/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/language/zh-TW/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/language/zh-TW/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/language/zh-TW/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/language/zh-TW/zh-TW.{{extension.element.lower}}.ini b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/language/zh-TW/zh-TW.{{extension.element.lower}}.ini new file mode 100644 index 00000000..ac9e4d4f --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/language/zh-TW/zh-TW.{{extension.element.lower}}.ini @@ -0,0 +1,21 @@ +; Copyright (C) 2016 {ORGANIZATION}. All rights reserved. +; License GNU General Public License version 2 or later. + +{{extension.element.upper}}="{{extension.name.cap}} 模組" +{{extension.element.upper}}_CREATED_DATE="建立時間" +{{extension.element.upper}}_FIELD_LIMIT="數量" +{{extension.element.upper}}_FIELD_LIMIT_DESC="限制清單數量" +{{extension.element.upper}}_FIELD_ORDER="排序方式" +{{extension.element.upper}}_FIELD_ORDER_DESC="選擇要用什麼欄位來排序" +{{extension.element.upper}}_FIELD_ORDER_DIR="排序方向" +{{extension.element.upper}}_FIELD_ORDER_DIR_DESCRIPTION="升冪或降冪排序。" +{{extension.element.upper}}_ID="編號 ID" +{{extension.element.upper}}_INSTALL_DESC="這是 {{extension.name.cap}} 模組" +{{extension.element.upper}}_MODIFIED_DATE="編輯時間" +{{extension.element.upper}}_ORDER_BY_RANDOM="隨機" +{{extension.element.upper}}_ORDER_DIR_ASC="正序" +{{extension.element.upper}}_ORDER_DIR_DESC="反序" +{{extension.element.upper}}_ORDERING="排列順序" +{{extension.element.upper}}_PUBLISH_DOWN="停止發佈時間" +{{extension.element.upper}}_PUBLISH_UP="開始發佈時間" +{{extension.element.upper}}_TITLE="標題" diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/language/zh-TW/zh-TW.{{extension.element.lower}}.sys.ini b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/language/zh-TW/zh-TW.{{extension.element.lower}}.sys.ini new file mode 100644 index 00000000..a4c9411e --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/language/zh-TW/zh-TW.{{extension.element.lower}}.sys.ini @@ -0,0 +1,5 @@ +; Copyright (C) 2016 {ORGANIZATION}. All rights reserved. +; License GNU General Public License version 2 or later. + +{{extension.element.upper}} = "{{extension.name.cap}} 模組" +{{extension.element.upper}}_INSTALL_DESC = "這是 {{extension.name.cap}} 模組" \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/model/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/model/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/model/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/model/model.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/model/model.php new file mode 100644 index 00000000..6d92f9e1 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/model/model.php @@ -0,0 +1,134 @@ +input; + + // Get sample data. + return $this->getSampleData(); + } + + // The following is example methods, please delete if you don't want them. + // -------------------------------------------------------------------------------------------- + + /** + * Get sample data. + * + * @return mixed select list array. + * + * @throws Exception + */ + protected function getSampleData() + { + $params = $this->state; + + // Init DB + $db = $this->db; + $query = $db->getQuery(true); + + // Get Joomla! API + $app = Factory::getApplication(); + $user = Factory::getUser(); + $date = Factory::getDate('now', $app->get('offset')); + + // Get Params and prepare data. + $catid = $params->get('catid', 1); + $order = $params->get('orderby', 'item.created'); + $dir = $params->get('order_dir', 'DESC'); + $limit = $params->get('limit', 5); + + // Category + + // If Choose all category, select ROOT category. + if (!in_array(1, $catid)) + { + $query->where("item.catid " . new JDatabaseQueryElement('IN()', $catid)); + } + + // Published + $query->where('item.state > 0'); + + $nullDate = $db->Quote($db->getNullDate()); + $nowDate = $db->Quote($date->toSql(true)); + + $query->where('(item.publish_up = ' . $nullDate . ' OR item.publish_up <= ' . $nowDate . ')'); + $query->where('(item.publish_down = ' . $nullDate . ' OR item.publish_down >= ' . $nowDate . ')'); + + // View Level + $query->where('item.access ' . new JDatabaseQueryElement('IN()', $user->getAuthorisedViewLevels())); + + // Language + if ($app instanceof SiteApplication && $app->getLanguageFilter()) + { + $lang_code = $db->quote(Factory::getLanguage()->getTag()); + $query->where("item.language IN ({$lang_code}, '*')"); + } + + // Prepare Tables + $table = array( + 'item' => '#__content', + 'cat' => '#__categories' + ); + + try + { + $select = Mod{{extension.name.cap}}Helper::getSelectList($table); + + // Load Data + $query->select($select) + ->from('#__content AS item') + ->join('LEFT', '#__categories AS cat ON item.catid = cat.id') + ->order("{$order} {$dir}"); + + $items = (array) $db->setQuery($query, 0, $limit)->loadObjectList(); + + foreach ($items as $key => &$item) + { + $item->link = JRoute::_("index.php?option=com_content&view=article&id={$item->id}:{$item->alias}&catid={$item->catid}"); + } + } + catch (\RuntimeException $e) + { + $items = range(1, 5); + + foreach ($items as $key => &$item) + { + $item = new Data; + + $item->item_title = '{{extension.name.cap}} data - ' . ($key + 1); + $item->link = '#'; + $item->item_created = $date->toSql(true); + } + } + + return $items; + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/tmpl/default.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/tmpl/default.php new file mode 100644 index 00000000..7a7c5ee2 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/tmpl/default.php @@ -0,0 +1,23 @@ + +
+
+ + + +
+
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/tmpl/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/tmpl/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/tmpl/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/{{extension.element.lower}}.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/{{extension.element.lower}}.php new file mode 100644 index 00000000..cc1a64e3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/{{extension.element.lower}}.php @@ -0,0 +1,18 @@ +getItems($params); +$classSfx = Mod{{extension.name.cap}}Helper::escape($params->get('moduleclass_sfx')); + +require JModuleHelper::getLayoutPath('{{extension.element.lower}}', $params->get('layout', 'default')); diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/{{extension.element.lower}}.xml b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/{{extension.element.lower}}.xml new file mode 100644 index 00000000..b3360d77 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/default/{{extension.element.lower}}.xml @@ -0,0 +1,165 @@ + + + {{extension.element.lower}} + Asika + 2014-02-06 + Copyright (C) 2016 {ORGANIZATION} + GNU General Public License version 2 or later. + + http://example.com + 1.0 + {{extension.element.upper}}_INSTALL_DESC + + install.php + + + + + {{extension.element.lower}}.php + tmpl + language + model + helper + index.html + {{extension.element.lower}}.xml + helper.php + install.php + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + +
+
+
+ + + + + + + + + + + +
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/module/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/install.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/install.php new file mode 100644 index 00000000..802ec027 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/install.php @@ -0,0 +1,80 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/language/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/language/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/language/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/language/zh-TW/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/language/zh-TW/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/language/zh-TW/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/language/zh-TW/zh-TW.{{extension.element.lower}}.ini b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/language/zh-TW/zh-TW.{{extension.element.lower}}.ini new file mode 100644 index 00000000..e65088ed --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/language/zh-TW/zh-TW.{{extension.element.lower}}.ini @@ -0,0 +1,8 @@ +; Copyright (C) 2016 {ORGANIZATION}. All rights reserved. +; License GNU General Public License version 2 or later. + +{{extension.element.upper}} = "{{plugin.group.cap}} - {{extension.name.cap}} 外掛" +{{extension.element.upper}}_XML_DESCRIPTION = "這是 {{plugin.group.cap}} 系列的 {{extension.name.cap}} 外掛" +COM_PLUGINS_{{extension.name.upper}}_FIELDSET_LABEL = "{{extension.name.cap}}" + +{{extension.element.upper}}_INCLUDE_PATH = "引入檔案資料夾" \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/language/zh-TW/zh-TW.{{extension.element.lower}}.sys.ini b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/language/zh-TW/zh-TW.{{extension.element.lower}}.sys.ini new file mode 100644 index 00000000..9bdb7cf3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/language/zh-TW/zh-TW.{{extension.element.lower}}.sys.ini @@ -0,0 +1,6 @@ +; Copyright (C) 2016 {ORGANIZATION}. All rights reserved. +; License GNU General Public License version 2 or later. + +{{extension.element.upper}} = "{{plugin.group.cap}} - {{extension.name.cap}} 外掛" +{{extension.element.upper}}_XML_DESCRIPTION = "這是 {{plugin.group.cap}} 系列的 {{extension.name.cap}} 外掛" +COM_PLUGINS_{{extension.name.upper}}_FIELDSET_LABEL = "{{extension.name.cap}}" \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/lib/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/lib/index.html new file mode 100644 index 00000000..3af63015 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/lib/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/{{extension.name.lower}}.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/{{extension.name.lower}}.php new file mode 100644 index 00000000..f46692f7 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/default/{{extension.name.lower}}.php @@ -0,0 +1,107 @@ + + + {{extension.element.lower}} + Asika + 2014-02-06 + Copyright (C) 2016 {ORGANIZATION} + GNU General Public License version 2 or later. + + http://example.com + 1.0 + {{extension.element.upper}}_XML_DESCRIPTION + + install.php + + + + + {{extension.name.lower}}.php + index.html + install.php + language + lib + + + + + +
+ +
+ +
+ +
+ +
+
+ + + +
diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/plugin/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/test/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/test/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/test/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/test/testClass.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/test/testClass.php new file mode 100644 index 00000000..fd10425c --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/test/testClass.php @@ -0,0 +1,45 @@ +instance = new \{{ origin.class.name }}; + } + + /** + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + * + * @return void + */ + protected function tearDown() + { + } + {{ test.methods }}} \ No newline at end of file diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/test/testMethod.php b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/test/testMethod.php new file mode 100644 index 00000000..d658d343 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/Template/test/testMethod.php @@ -0,0 +1,16 @@ + + /** + * Method to test {{ origin.method }}(). + * + * @return void + * + * @covers {{ origin.class.name }}::{{ origin.method }} + * @TODO Implement test{{ test.method }}(). + */ + public function test{{ test.method }}() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } diff --git a/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/index.html b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/index.html new file mode 100644 index 00000000..2efb97f3 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/GeneratorBundle/index.html @@ -0,0 +1 @@ + diff --git a/deployed/windwalker/libraries/windwalker/bundles/SystemBundle/Command/Asset/AssetCommand.php b/deployed/windwalker/libraries/windwalker/bundles/SystemBundle/Command/Asset/AssetCommand.php new file mode 100644 index 00000000..a519e12f --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/SystemBundle/Command/Asset/AssetCommand.php @@ -0,0 +1,32 @@ +addCommand(new MakesumCommand); + + parent::initialise(); + } + + protected function doExecute() + { + return parent::doExecute(); + } +} diff --git a/deployed/windwalker/libraries/windwalker/bundles/SystemBundle/Command/Asset/Makesum/MakesumCommand.php b/deployed/windwalker/libraries/windwalker/bundles/SystemBundle/Command/Asset/Makesum/MakesumCommand.php new file mode 100644 index 00000000..c148f069 --- /dev/null +++ b/deployed/windwalker/libraries/windwalker/bundles/SystemBundle/Command/Asset/Makesum/MakesumCommand.php @@ -0,0 +1,251 @@ +