{ if ('create' != \$this->currentAction) { \\XLite\\Core\\TopMessage::addInfo('The {$targetOneHumanReadableNameLow} has been updated'); } else { \\XLite\\Core\\TopMessage::addInfo('The {$targetOneHumanReadableNameLow} has been added'); } } } CODE; macro_file_put_contents($oneViewModelPath, $string); echo 'done' . PHP_EOL; // }}} // {{{ View model form widget $formOnePath = macro_convert_class_name_to_path($formOneClass); echo "\t" . 'form ' . $formOnePath . ' ... '; $formOneClassShort = macro_get_class_short_name($formOneClass); $oneFormCSS = macro_assemble_tpl_name($targetOneSkinDir . '/style.css', $moduleAuthor, $moduleName); $className = strtolower(str_replace('_', '-', $targetOne)); $string = macro_get_class_repo_header($formOnePath) . <<<CODE /** * {$targetHumanReadableName} list search form * * @see ____class_see____ * @since 1.0.0 */ class {$formOneClassShort} extends \\XLite\\View\\Form\\AForm { /** * Register CSS files
macro_check_file_path($path); macro_check_module($author, $module); // Assemble decorate class name $decoratedClass = macro_convert_path_to_class_name($path); // Assemble target class name $parts = explode('\\', $decoratedClass); array_shift($parts); $parts = array_values($parts); if (0 == count($parts)) { $parts = array('XLite'); } elseif ('Module' == $parts[0]) { $parts = array_slice($parts, 3); } $targetClass = 'XLite\\Module\\' . $author . '\\' . $module . '\\' . implode('\\', $parts); // Assemble target file path $targetPath = macro_convert_class_name_to_path($targetClass); // Get file content $decoratedClassFull = '\\' . $decoratedClass; $className = array_pop($parts); $content = macro_get_class_repo_header($targetPath) . macro_get_class_header($path) . <<<CODE abstract class {$className} extends {$decoratedClassFull} implements \\XLite\\Base\\IDecorator { } CODE; // Write content macro_file_put_contents($targetPath, $content); echo $targetPath . ' create' . PHP_EOL; die(0); /**